Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int GetMin_Max(int *a)
- {
- int x,b;
- for(x=0;x<15;x++)
- {
- if(x==0 || *(a+x)>b)
- {
- b=*(a+x);
- }
- }
- return b;
- }
- int main (void)
- {
- int m;
- int ret;
- int a[15];
- printf("정수 15개를 입력하세요.\n");
- for(m=0;m<15;m++)
- {
- scanf("%d",&a[m]);
- }
- ret = GetMin_Max(a);
- printf("최대값: %d\n",ret);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment