Initialization#
This commit is contained in:
parent
272be6c4b2
commit
71ce33da73
@ -28,7 +28,7 @@ int main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Parse the line
|
// Parse the line
|
||||||
sscanf(line, "%lf%c%lf=%lf", &num1, &op, &num2, &expected_result);
|
sscanf(line, "%lf%c%lf=%.2lf", &num1, &op, &num2, &expected_result);
|
||||||
|
|
||||||
// Check if the input is valid
|
// Check if the input is valid
|
||||||
if (op != '+' && op != '-' && op != '*' && op != '/') {
|
if (op != '+' && op != '-' && op != '*' && op != '/') {
|
||||||
|
Loading…
Reference in New Issue
Block a user