# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
4157 | dbfud | 최댓값 (tutorial2) | C++98 | 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 <iostream>
using namespace std;
int GetMax ( int N , int * arr )
{
int Max = 0 ;
for ( int i = 0 ; i < N ; i++ )
{
if ( Max < arr[i] )
{
Max = arr[i] ;
}
}
return Max ;
}
int main(int argc, char *argv[])
{
int arryNum = 0 ;
cin >> arryNum ;
int array[10] = { 0 , };
for ( int i = 0; i < arryNum ; ++i )
{
cin >> array[i] ;
}
cout << GetMax ( arryNum , array );
}