test
This commit is contained in:
parent
00786a8829
commit
016760ec5b
@ -1,8 +1,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <string.h> // Include string.h for strlen
|
||||
#include <string.h>
|
||||
|
||||
#define MAX_LINE_LENGTH 100
|
||||
|
||||
@ -46,7 +45,7 @@ int main() {
|
||||
break;
|
||||
case '/':
|
||||
if (cislo2 == 0) {
|
||||
printf("ZLE\n");
|
||||
printf("CHYBA\n");
|
||||
continue;
|
||||
}
|
||||
vysledok_skutocny = cislo1 / cislo2;
|
||||
@ -56,6 +55,8 @@ int main() {
|
||||
continue;
|
||||
}
|
||||
|
||||
vysledok_skutocny = round(vysledok_skutocny * 100) / 100.0;
|
||||
|
||||
if (fabs(vysledok_skutocny - vysledok_zadany) < 1e-6) {
|
||||
printf("OK\n");
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user