usaa25/sk2/main.c
2026-02-03 21:25:25 +01:00

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;
}