# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
9144 | carl111 | 최댓값 (tutorial2) | C11 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <stdio.h>
int GetMax(int m, int arr2[])
{
int i;
int swap;
swap=arr2[0];
for(i=0; i<m; i++)
{
if(arr2[i]>swap)
swap = arr2[i];
}
return swap;
}
int main(void)
{
int n,i;
int arr[100];
scanf("%d",&n);
for(i=0; i<n; i++)
arr[i]=0;
for(i=0; i<n; i++)
{
scanf("%d",arr[i]);
}
i=GetMax(n,arr);
printf("%d",i);
return 0;
}