OAIP/lab3/lab3-4/lab3-4.c
2024-10-21 17:04:00 +04:00

24 lines
373 B
C

#include <stdio.h>
#include <Windows.h>
int main() {
SetConsoleCP(1251);
SetConsoleOutputCP(1251);
int nums[5];
int max;
printf("ââåäèòå 5 öåëûõ ÷èñåë: ");
scanf_s("%d%d%d%d%d", &nums[0], &nums[1], &nums[2], &nums[3], &nums[4]);
max = nums[0];
for (int i = 1; i < 5; i++) {
if (nums[i] > max) max = nums[i];
}
printf("max = %d", max);
return 0;
}