cv3
This commit is contained in:
parent
cc62da2362
commit
c52a1879d9
@ -15,12 +15,10 @@ 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);
|
||||||
istr = strstr(str,vstup);
|
vstup[strcspn(vstup, "\n")] = 0;
|
||||||
if(vstup[0] == '\n' || istr != NULL){
|
if(strlen(vstup) == 0){
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(vstup[0] == '-' || vstup[0] == '+' || vstup[0] == '*' || vstup[0] == '/'){
|
if(vstup[0] == '-' || vstup[0] == '+' || vstup[0] == '*' || vstup[0] == '/'){
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user