Aktualizovat „du5/program.c“
This commit is contained in:
parent
554e5241cf
commit
0c18f888e3
@ -6,7 +6,7 @@ int main(){
|
|||||||
int score[50];
|
int score[50];
|
||||||
int pos = 0;
|
int pos = 0;
|
||||||
while(1){
|
while(1){
|
||||||
scanf("%[^0-9] %d", name[pos], &score[pos]);
|
scanf("%d %[^\n]", name[pos], &score[pos]);
|
||||||
scanf("%*c");
|
scanf("%*c");
|
||||||
pos++;
|
pos++;
|
||||||
int tmpCh = getc(stdin);
|
int tmpCh = getc(stdin);
|
||||||
@ -87,6 +87,6 @@ int main(){
|
|||||||
for(int i = 0; i < newPos; i++){
|
for(int i = 0; i < newPos; i++){
|
||||||
printf("%d %s\n", newScore[i], newName[i]);
|
printf("%d %s\n", newScore[i], newName[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("Hello\n");
|
printf("Hello");
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user