test
This commit is contained in:
parent
91ea4221a9
commit
ff00ea7f21
@ -18,14 +18,14 @@ int main() {
|
||||
}
|
||||
}
|
||||
if (isEmpty) {
|
||||
printf("OK\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
int cislo1, cislo2;
|
||||
double vysledok_zadany;
|
||||
double cislo1, cislo2, vysledok_zadany;
|
||||
char operacia;
|
||||
|
||||
if (sscanf(uloha, "%d %c %d = %lf", &cislo1, &operacia, &cislo2, &vysledok_zadany) != 4) {
|
||||
if (sscanf(uloha, "%lf %c %lf = %lf", &cislo1, &operacia, &cislo2, &vysledok_zadany) != 4) {
|
||||
printf("CHYBA\n");
|
||||
continue;
|
||||
}
|
||||
@ -47,7 +47,7 @@ int main() {
|
||||
printf("ZLE\n");
|
||||
continue;
|
||||
}
|
||||
vysledok_skutocny = (double)cislo1 / cislo2;
|
||||
vysledok_skutocny = cislo1 / cislo2;
|
||||
break;
|
||||
default:
|
||||
printf("CHYBA\n");
|
||||
|
Loading…
Reference in New Issue
Block a user