This commit is contained in:
Your Name 2025-10-16 03:52:55 +02:00
parent fb7cbf1ad2
commit ef75bb1915

View File

@ -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)
{ {