Aktualizovat „du5/program.c“

This commit is contained in:
Artem Horbunov 2020-04-07 14:45:58 +00:00
parent 7e66c53777
commit 45fc4c1d3d

View File

@ -41,6 +41,7 @@ int main(){
} }
} }
for(int d = 0; d < newPos - 1; d++){
for(int i = 0; i < newPos - 1; i++){ for(int i = 0; i < newPos - 1; i++){
if(newScore[i] < newScore[i + 1]){ if(newScore[i] < newScore[i + 1]){
int tmpScore = newScore[i]; int tmpScore = newScore[i];
@ -52,7 +53,6 @@ int main(){
strcpy(newName[i], newName[i + 1]); strcpy(newName[i], newName[i + 1]);
strcpy(newName[i + 1], tmpName); strcpy(newName[i + 1], tmpName);
i = -1;
} }
else if(newScore[i] == newScore[i + 1]){ else if(newScore[i] == newScore[i + 1]){
int test = 0; int test = 0;
@ -80,7 +80,7 @@ int main(){
break; break;
} }
} }
i = -1; }
} }
} }