20
This commit is contained in:
parent
9bf18a7adf
commit
b476296374
@ -32,8 +32,8 @@ float calculator(float n1, float n2, char operation) {
|
|||||||
if (n2 != 0) {
|
if (n2 != 0) {
|
||||||
return n1 / n2;
|
return n1 / n2;
|
||||||
} else {
|
} else {
|
||||||
printf("Error: division by zero\n");
|
printf("division by zero\n");
|
||||||
return 0;
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user