20 lines
323 B
C
20 lines
323 B
C
#include <stdio.h>
|
|
#include "calculator.h"
|
|
|
|
int main(){
|
|
char infix[MAX];
|
|
char postfix[MAX];
|
|
|
|
printf("Zadaj matematicky vyraz:\n");
|
|
fgets(infix, MAX, stdin);
|
|
|
|
infix_to_postfix(infix, postfix);
|
|
|
|
double vysledok = evaluate_postfix(postfix);
|
|
|
|
printf("Vysledok: %.2f\n", vysledok);
|
|
|
|
return 0;
|
|
}
|
|
|