Update a1/program.c
This commit is contained in:
parent
a345b708e9
commit
0dbe25d7ae
@ -57,13 +57,14 @@ int main()
|
||||
mystack.size=0;
|
||||
|
||||
char str[128];
|
||||
scanf("%s", str);
|
||||
|
||||
fgets(str,100,stdin);
|
||||
printf("Read: %s", str);
|
||||
|
||||
int i=0;
|
||||
char c, cs;
|
||||
bool is_ok=true;
|
||||
while(str[i]!='\0' && is_ok)
|
||||
while(str[i]!='\0' && str[i]!='\n' && is_ok)
|
||||
{
|
||||
c=str[i];
|
||||
if(c=='<'||c=='('||c=='{'||c=='[')
|
||||
@ -119,5 +120,6 @@ int main()
|
||||
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user