From 0c18f888e36c5859ff1dcd867b184fdb9ca0613e Mon Sep 17 00:00:00 2001 From: Artem Horbunov Date: Tue, 7 Apr 2020 14:11:15 +0000 Subject: [PATCH] =?UTF-8?q?Aktualizovat=20=E2=80=9Edu5/program.c=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- du5/program.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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