diff --git a/cv2/.prigram.c.swp b/cv2/.prigram.c.swp deleted file mode 100644 index a37279a..0000000 Binary files a/cv2/.prigram.c.swp and /dev/null differ diff --git a/cv2/program.c b/cv2/program.c index 91ccc8c..3672afa 100644 --- a/cv2/program.c +++ b/cv2/program.c @@ -28,7 +28,12 @@ int main(){ } } - printf("Výherca je súťažiaci %d ktorý vypil %d pohárov.\n", winner_index + 1, max_num); + printf("Výherca je súťažiaci"); + for (int i = 0; i < count; i++) { + if (field[i] == max_num) { + printf("%d, ktorý vypil %d pohárov.\n", i + 1, max_num); + } + } return 0; }