1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #define SIZE 10 int main(void) { int prices[SIZE] = { 12, 3, 19, 6, 18, 8, 12, 4, 1, 19 }; int i, maximum; printf("[ "); for (i = 0; i < SIZE; i++) { printf("%d ", prices[i]); } printf("]\n"); maximum = prices[0]; for (i = 1; i < SIZE; i++) { if (prices[i] > maximum) maximum = prices[i]; } printf("ÃÖ´ë°ªÀº %dÀÔ´Ï´Ù.\n", maximum); return 0; } | cs |