¿½ÉÈ÷ ÇÏ´Â ¸ð½ÀÀÌ º¸±â ÁÁ½À´Ï´Ù.
Áý¿¡¼µµ ¸¹ÀÌ ÇÁ·Î±×·¥Çغ¸±â ¹Ù¶ø´Ï´Ù.
µÎ ±ºµ¥¿¡ ¼¼¹ÌÄÝ·ÐÀ» Ãß°¡ÇÑ °ÍÀÌ Àß ¸ø ÀÔ´Ï´Ù.
#include <stdio.h>
int list[10] = {23,13,67,28,69,41,9,2,20,60};
main()
{
int i, max = list[0];
for(i=1 ; i<10 ; i++); <- ¼¼¹ÌÄÝ·ÐÀÌ ¾ø¾î¾ß ÇÕ´Ï´Ù.
{
if (list[i]>max); <- ¼¼¹ÌÄÝ·ÐÀÌ ¾ø¾î¾ß ÇÕ´Ï´Ù.
max = list[i];
}
printf("maximum number = %d\n",max);
}