diff --git a/cv2/program.c b/cv2/program.c index e3da9f4..30aef50 100644 --- a/cv2/program.c +++ b/cv2/program.c @@ -46,8 +46,8 @@ int main() { a = a / 2; //printf("%d", a); - for (c = 0; c < a + 2; c++){ - for (d = 0; d < a; d++){ + for (c = 0; c < a - 1; c++){ + for (d = 0; d < a - 1; d++){ d++; if (jedalny_listok[d].prize > jedalny_listok[d+2].prize){ pred = jedalny_listok[d].prize;