4
This commit is contained in:
parent
e99adaa6a4
commit
69f29b231d
@ -69,7 +69,7 @@ int main() {
|
||||
if (is_number(arr)) {
|
||||
float number = strtof(arr, &pend);
|
||||
push(number);
|
||||
printf("%.2f ", number);
|
||||
printf("%.2f\n", number);
|
||||
}
|
||||
else if (is_operation(arr)) {
|
||||
if (stack_top < 1) {
|
||||
@ -82,7 +82,7 @@ int main() {
|
||||
char operation = arr[0];
|
||||
float result = calculator(n1, n2, operation);
|
||||
push(result);
|
||||
printf("%.2f ", result);
|
||||
printf("%.2f\n", result);
|
||||
}
|
||||
else {
|
||||
printf("no input\n");
|
||||
@ -91,9 +91,9 @@ int main() {
|
||||
}
|
||||
|
||||
if (stack_top == 0) {
|
||||
printf("\n%.2f\n", pop());
|
||||
printf("%.2f\n", pop());
|
||||
} else {
|
||||
printf("\nno input\n");
|
||||
printf("no input\n");
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user