Aktualizovat du3/program.c
This commit is contained in:
parent
3c1176b58f
commit
91c5e8609a
@ -128,14 +128,18 @@ int main()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
float num1 = strtof(num1Temp, &strtofEndPtr);
|
||||||
|
float num2 = strtof(num2Temp, &strtofEndPtr);
|
||||||
|
float resultNum = strtof(result, &strtofEndPtr);
|
||||||
|
|
||||||
//** konecna faza = vypisovanie vysledkov
|
//** konecna faza = vypisovanie vysledkov
|
||||||
|
|
||||||
//ak systematicka chyba
|
//ak systematicka chyba
|
||||||
if (isLineInvalid = true || op1 == 'N' || IsArithCorrect(strtof(num1Temp, strtofEndPtr),strtof(num2Temp, strtofEndPtr), op1) == -1)
|
if (isLineInvalid = true || op1 == 'N' || IsArithCorrect(num1, num2, op1, resultNum) == -1)
|
||||||
{
|
{
|
||||||
printf("CHYBA\n");
|
printf("CHYBA\n");
|
||||||
}
|
}
|
||||||
else if (IsArithCorrect(strtof(num1Temp, &strtofEndPtr),strtof(num2Temp, &strtofEndPtr), op1) == 0)
|
else if (IsArithCorrect(num1, num2, op1, resultNum) == 0)
|
||||||
{
|
{
|
||||||
printf("ZLE\n");
|
printf("ZLE\n");
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user