This commit is contained in:
Bohdan Kapliuk 2024-10-12 15:12:19 +03:00
parent 81388f4343
commit 09c995f5ea

View File

@ -17,6 +17,9 @@ int main(){
int counter = 0; int counter = 0;
while(1){ while(1){
fgets(vstup, STACK_SIZE, stdin); fgets(vstup, STACK_SIZE, stdin);
if(vstup[0] == '\n'){
break;
}
if(vstup[0] == '-' || vstup[0] == '+' || vstup[0] == '*' || vstup[0] == '/'){ if(vstup[0] == '-' || vstup[0] == '+' || vstup[0] == '*' || vstup[0] == '/'){
if(vstup[0] == '-'){ if(vstup[0] == '-'){
mystack.values[0] = mystack.values[0] - mystack.values[1]; mystack.values[0] = mystack.values[0] - mystack.values[1];