aktivita1

This commit is contained in:
Maryna Kravtsova 2020-10-20 21:29:41 +02:00
parent fc56ac9322
commit c8f47a8e0e

View File

@ -10,7 +10,6 @@ struct stack{
}s; }s;
void push(char ch){ void push(char ch){
if(s.size < 100){ if(s.size < 100){
assert(s.size < 100); assert(s.size < 100);
s.size++; s.size++;
@ -20,7 +19,6 @@ void push(char ch){
exit(0); exit(0);
} }
} }
void pop(){ void pop(){
@ -61,7 +59,6 @@ char right_pair(char a){
b = '>'; b = '>';
} }
return b; return b;
} }
char gettop(){ char gettop(){
@ -74,6 +71,8 @@ int main(){
//memset(&mystack, 0 , sizeof(struct stack)); //memset(&mystack, 0 , sizeof(struct stack));
char line[100]; char line[100];
s.size = -1; s.size = -1;
printf("Read: ");
char *x = fgets(line, 100, stdin); char *x = fgets(line, 100, stdin);
int l = strlen(line); int l = strlen(line);