From 013cf048b4fd908ef6cc63e27fa690ea15d5021b Mon Sep 17 00:00:00 2001 From: Oleksandr Hryshchenko Date: Tue, 6 Apr 2021 14:58:45 +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'du5/program.c'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- du5/program.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/du5/program.c b/du5/program.c index ff66f2d..17dc28c 100644 --- a/du5/program.c +++ b/du5/program.c @@ -42,6 +42,11 @@ void bsortDesc(struct entry* list[80], int s){ list[j] = list[j + 1]; list[j + 1] = temp; } + else if ((list[j]->votes == list[j + 1]->votes) && (list[j]->name[0] < list[j + 1]->name[0])){ + temp = list[j]; + list[j] = list[j + 1]; + list[j + 1] = temp; + } } } }