From 14855a54d4fb00c108d5dfd75f2caf3bfc3d65a5 Mon Sep 17 00:00:00 2001 From: Andrii Hermaniuk Date: Thu, 7 Apr 2022 16:49:18 +0200 Subject: [PATCH] ds --- du5/program.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/du5/program.c b/du5/program.c index 73e3669..83567bf 100644 --- a/du5/program.c +++ b/du5/program.c @@ -43,14 +43,14 @@ int main(){ databaza[size].votes=value; size+=1; - if(size>1){ - //printf("=====================================\n"); - qsort(databaza, size, sizeof(struct student), compare); - } } else { databaza[id].votes+=value; } + if(size>1){ + //printf("=====================================\n"); + qsort(databaza, size, sizeof(struct student), compare); + } } printf("Vysledky:\n"); for(int idx=0;databaza[idx].name[0]!='\0';idx++)