funguje
This commit is contained in:
parent
fb7cbf1ad2
commit
ef75bb1915
@ -89,6 +89,11 @@ int main()
|
|||||||
while (fgets(input,sizeof(input),stdin)!=NULL)
|
while (fgets(input,sizeof(input),stdin)!=NULL)
|
||||||
{
|
{
|
||||||
int flag=switch_operators(input);
|
int flag=switch_operators(input);
|
||||||
|
if((input[0]>=0 && input[0]<=47 && input[0]!=43 && input[0]!=45 && input[0]!=42 && input[0]!=47 && (input[0]<48 || input[0]>57)) || (input[0]>=58 && input[0]<=127))
|
||||||
|
{
|
||||||
|
printf("bad input\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
input[strcspn(input,"\n")]=0;
|
input[strcspn(input,"\n")]=0;
|
||||||
if (flag==0 || flag==-1)
|
if (flag==0 || flag==-1)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user