From b476296374a049d9b3b3b87ba63a2b21d9d60682 Mon Sep 17 00:00:00 2001 From: Deinerovych Date: Wed, 16 Oct 2024 11:59:18 +0200 Subject: [PATCH] 20 --- cv3/program.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cv3/program.c b/cv3/program.c index b4f975c..b36eec8 100644 --- a/cv3/program.c +++ b/cv3/program.c @@ -32,8 +32,8 @@ float calculator(float n1, float n2, char operation) { if (n2 != 0) { return n1 / n2; } else { - printf("Error: division by zero\n"); - return 0; + printf("division by zero\n"); + exit(1); } } return 0;