Aktualizovat „du4/program.c“
This commit is contained in:
parent
9363b1ede5
commit
e8448fbb67
@ -60,10 +60,11 @@ int main()
|
|||||||
double first =-5,second =-5,res=-5;
|
double first =-5,second =-5,res=-5;
|
||||||
char c='E';
|
char c='E';
|
||||||
char ravno[3];
|
char ravno[3];
|
||||||
|
ravno[1]='\n';
|
||||||
sscanf(new_str,"%lf%c%lf%s%lf",&first,&c,&second,ravno,&res);
|
sscanf(new_str,"%lf%c%lf%s%lf",&first,&c,&second,ravno,&res);
|
||||||
|
|
||||||
|
|
||||||
if(c=='E'||first==-5||second==-5||res==-5||(c!=43&&c!=42&&c!=45&&c!=47||(strlen(ravno)!=1||ravno[0]!='='))){
|
if(c=='E'||first==-5||second==-5||res==-5||(c!=43&&c!=42&&c!=45&&c!=47)||(ravno[1]!='\n'||ravno[0]!='=')){
|
||||||
printf("CHYBA\n");
|
printf("CHYBA\n");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user