Aktualizovat du3/program.c

This commit is contained in:
Tomáš Vlček 2026-03-19 01:27:57 +00:00
parent 41b3e58a1d
commit 1c8bbfb8ef

View File

@ -32,8 +32,8 @@ float IsArithCorrect(float num1, float num2, char op, float result)
break; break;
} }
float calcResult = roundf(calcResult* 100.0f) / 100.0f; calcResult = roundf(calcResult* 100.0f) / 100.0f;
float result = roundf(result * 100.0f) / 100.0f; result = roundf(result * 100.0f) / 100.0f;
if (calcResult == result) if (calcResult == result)
{ {
@ -126,7 +126,7 @@ int main()
{ {
printf("CHYBA\n"); printf("CHYBA\n");
} }
else if (IsArithCorrect(num1, num2, &op1, resultNum) == 0) else if (IsArithCorrect(num1, num2, op1, resultNum) == 0)
{ {
printf("ZLE\n"); printf("ZLE\n");
} }