Aktualizovat „du5/program.c“

This commit is contained in:
Artem Horbunov 2020-04-08 08:55:02 +00:00
parent e1f9373c19
commit a234cf28ed

View File

@ -14,10 +14,15 @@ int main(){
ungetc(tmpCh, stdin); ungetc(tmpCh, stdin);
scanf("%d %[^\n]", &score[pos], name[pos]); scanf("%d %[^\n]", &score[pos], name[pos]);
tmpCh = getc(stdin);
if(tmpCh == EOF) break;
ungetc(tmpCh, stdin);
scanf("%*c"); scanf("%*c");
pos++; pos++;
if(strcmp(name[pos - 1], cmpStr1) == 0) break; //if(strcmp(name[pos - 1], cmpStr1) == 0) break;
if(strcmp(name[pos - 1], cmpStr2) == 0) break; //if(strcmp(name[pos - 1], cmpStr2) == 0) break;
tmpCh = getc(stdin); tmpCh = getc(stdin);
if(tmpCh == '\n') break; if(tmpCh == '\n') break;