From 0e91c00e7dda1b24898af011ba9f4c6fbdcce66c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dami=C3=A1n=20Korpesio?= Date: Thu, 14 Oct 2021 10:17:15 +0200 Subject: [PATCH] prvy --- cv2/program.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cv2/program.c b/cv2/program.c index c14d17f..76d1ce1 100644 --- a/cv2/program.c +++ b/cv2/program.c @@ -46,8 +46,9 @@ int main() { a = a / 2; //printf("%d", a); - for (c = 0; c < a - 1; c++){ - for (d = c; d < a - c - 1; d++){ + for (c = 0; c < a; c++){ + for (d = 0; d < a; d++){ + d++; if (jedalny_listok[d].prize > jedalny_listok[d+2].prize){ pred = jedalny_listok[d].prize; jedalny_listok[d].prize = jedalny_listok[d + 2].prize;