This commit is contained in:
Bohdan Kapliuk 2024-10-12 15:22:15 +03:00
parent d17535a455
commit cc62da2362

View File

@ -15,9 +15,12 @@ int main(){
memset(&mystack,0,sizeof(struct stack)); memset(&mystack,0,sizeof(struct stack));
char vstup[STACK_SIZE]; char vstup[STACK_SIZE];
int counter = 0; int counter = 0;
char str[9]="no input";
char *istr;
while(1){ while(1){
fgets(vstup, STACK_SIZE, stdin); fgets(vstup, STACK_SIZE, stdin);
if(vstup[0] == '\n'){ istr = strstr(str,vstup);
if(vstup[0] == '\n' || istr != NULL){
break; break;
} }
if(vstup[0] == '-' || vstup[0] == '+' || vstup[0] == '*' || vstup[0] == '/'){ if(vstup[0] == '-' || vstup[0] == '+' || vstup[0] == '*' || vstup[0] == '/'){