From b50423e94d676914bc2c1f3d5f32d7823d08c219 Mon Sep 17 00:00:00 2001 From: Oleksandr Hryshchenko Date: Thu, 15 Apr 2021 19:15:55 +0000 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20'du6/program.c'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- du6/program.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/du6/program.c b/du6/program.c index 4a08b3b..c995c27 100644 --- a/du6/program.c +++ b/du6/program.c @@ -44,11 +44,13 @@ int main(){ //Этот код отвечает за сортировку заданных имён в списке зачисленных (а-я) int changesMade = 1; while (changesMade){ + changesMade = 0; for(int i = 0; i < finalPosition; i++){ while(inputs[i][count] == inputs[i+1][count]){ count++; } if(inputs[i][count] > inputs[i+1][count]){ + changesMade = 1; strcpy(temp, inputs[i]); strcpy(inputs[i], inputs[i+1]); strcpy(inputs[i+1], temp);