zmeny
This commit is contained in:
parent
76a3345cde
commit
cd157124c5
@ -1,5 +1,6 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
bool is_operation(char op) {
|
bool is_operation(char op) {
|
||||||
return op == '+' || op == '-' || op == '*' || op == '/';
|
return op == '+' || op == '-' || op == '*' || op == '/';
|
||||||
@ -35,6 +36,9 @@ int main() {
|
|||||||
result = firstNumber / secondNumber;
|
result = firstNumber / secondNumber;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
result = roundf(result * 100) / 100;
|
||||||
|
|
||||||
if (ans == result) {
|
if (ans == result) {
|
||||||
printf("OK\n");
|
printf("OK\n");
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user