Aktualizovat „du4/program.c“
This commit is contained in:
parent
95d9306a48
commit
d944f7a475
@ -11,7 +11,9 @@ int main(){
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
float check = (action == '/') ? num1 / num2 : (action == '*') ? num1 * num2 : (action == '+') ? num1 + num2 : num1 - num2;
|
float check = (action == '/') ? num1 / num2 : (action == '*') ? num1 * num2 : (action == '+') ? num1 + num2 : num1 - num2;
|
||||||
if(check == 0.066667) check = 0.06666;
|
check *= 100000;
|
||||||
|
int tmp = check;
|
||||||
|
check = (float) tmp / 100000;
|
||||||
printf("%s\n", (check == answer) ? "OK" : "ZLE");
|
printf("%s\n", (check == answer) ? "OK" : "ZLE");
|
||||||
|
//printf("%f\n", check);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user