Update 'du4/program.c'
This commit is contained in:
parent
2fc2076427
commit
552a60316c
@ -36,7 +36,7 @@ int main() {
|
|||||||
num1 = strtof(line, &next);
|
num1 = strtof(line, &next);
|
||||||
while (*next == ' ') next++;
|
while (*next == ' ') next++;
|
||||||
if (*next != op) {
|
if (*next != op) {
|
||||||
printf("CHYBA\n");
|
printf("KONIEC\n");
|
||||||
goto next_line;
|
goto next_line;
|
||||||
}
|
}
|
||||||
next++;
|
next++;
|
||||||
@ -67,10 +67,6 @@ int main() {
|
|||||||
result = num1 * num2;
|
result = num1 * num2;
|
||||||
break;
|
break;
|
||||||
case '/':
|
case '/':
|
||||||
if (num2 == 0) {
|
|
||||||
printf("CHYBA\n");
|
|
||||||
goto next_line;
|
|
||||||
}
|
|
||||||
result = num1 / num2;
|
result = num1 / num2;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user