diff --git a/du5/program.c b/du5/program.c index dd550c2..2a1011c 100644 --- a/du5/program.c +++ b/du5/program.c @@ -6,7 +6,7 @@ int main(){ int score[50]; int pos = 0; while(1){ - scanf("%[^0-9] %d", name[pos], &score[pos]); + scanf("%d %[^\n]", name[pos], &score[pos]); scanf("%*c"); pos++; int tmpCh = getc(stdin); @@ -87,6 +87,6 @@ int main(){ for(int i = 0; i < newPos; i++){ printf("%d %s\n", newScore[i], newName[i]); } - - printf("Hello\n"); + + printf("Hello"); } \ No newline at end of file