refresh
This commit is contained in:
parent
145f021165
commit
cb46e866fe
@ -4,11 +4,11 @@
|
||||
|
||||
int main() {
|
||||
char input[100];
|
||||
if (fgets(input, sizeof(input), stdin) == NULL || input[0] == '\n') {
|
||||
|
||||
if (fgets(input, sizeof(input), stdin) != NULL && input[0] == '\n') {
|
||||
return 0;
|
||||
}
|
||||
|
||||
while (fgets(input, sizeof(input), stdin) != NULL && input[0] == '\n') {
|
||||
|
||||
double cislo1;
|
||||
double cislo2;
|
||||
@ -17,6 +17,11 @@ int main() {
|
||||
char rovno;
|
||||
int colznakov = sscanf(input, "%lf %c %lf %c %lf", &cislo1, &znak, &cislo2, &rovno, &result);
|
||||
|
||||
if (colznakov != 5 || rovno != '=') {
|
||||
printf("CHYBA\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
double result2;
|
||||
|
||||
switch (znak)
|
||||
@ -51,9 +56,5 @@ int main() {
|
||||
printf("Zle\n");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
BIN
du3/program.exe
BIN
du3/program.exe
Binary file not shown.
Loading…
Reference in New Issue
Block a user