Update 'cv3/program.c'

This commit is contained in:
Anzhelika Nikolaieva 2023-10-10 18:19:20 +00:00
parent 13bbbe9ae1
commit b91eef8dd8

View File

@ -50,7 +50,7 @@ int operation_insert_result(struct stack_glavny* stack, char operation) {
break; break;
case '/': case '/':
if (operand2 == 0) { if (operand2 == 0) {
//printf("Chyba: Delenie nulou.\n"); //printf("division by zero\n");
return false; return false;
} }
result = operand1 / operand2; result = operand1 / operand2;
@ -79,7 +79,6 @@ int main() {
while (1) { while (1) {
char* a = fgets(input, sizeof(input), stdin); char* a = fgets(input, sizeof(input), stdin);
if (a == NULL){ if (a == NULL){
//if (!fgets(input, sizeof(input), stdin)) {
printf("no input\n"); printf("no input\n");
break; break;
} }