Aktualizovat „du4/program.c“
This commit is contained in:
parent
28daab5c2e
commit
37145fb7db
@ -52,19 +52,9 @@ double compare_percent(double a, double b, double eps)
|
||||
int main()
|
||||
{
|
||||
char str[100][100];
|
||||
int i =0;
|
||||
int j =0;
|
||||
char b ;
|
||||
while((b=getchar())!=EOF){
|
||||
if(b=='\n'){
|
||||
j=0;
|
||||
i++;
|
||||
}
|
||||
str[i][j]=b;
|
||||
j++;
|
||||
}
|
||||
for(int k=0;k<=i-1;k++){
|
||||
char *new_str = compactString(str[k],strlen(str[k]));
|
||||
for(int i =0;fgets(str[i],100,stdin);i++){
|
||||
char *new_str = compactString(str[i],strlen(str[i]));
|
||||
double first =-5,second =-5,res=-5;
|
||||
char c='E';
|
||||
sscanf(new_str,"%lf%c%lf%*[=]%lf",&first,&c,&second,&res);
|
||||
@ -82,6 +72,6 @@ int main()
|
||||
printf("ZLE\n");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user