Notice
Recent Posts
Recent Comments
Creative Code
findMAxArray.c(배열 최댓값 구하기) 본문
#include <stdio.h>
int main(void)
{
int nums[10] = {50,90,30,100,80,10,20,40,70,60};
int max = nums[0];
for (int i = 0; i<10; i++){
if (max < nums[i]){
max = nums[i];
}
}
printf("max : %d\n",max);
return 0;
}
'C Programming' 카테고리의 다른 글
findValueinArray.c( 배열에서 값 찾기) (0) | 2023.08.02 |
---|---|
findvalue.c(배열에서 값의 존재여부) (0) | 2023.08.01 |
sumArray.c(배열 값 더하기) (0) | 2023.08.01 |
xwing.c(x모양 별 출력) (0) | 2023.08.01 |
sumOne2Ten2.c(1부터 10까지 더하기) (1) | 2023.08.01 |