답안 #250125

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
250125 2020-07-17T04:21:59 Z linear00000 최댓값 (tutorial2) C++14
컴파일 오류
0 ms 0 KB
int GetMax(int n, int[] A) {
  int a = -1;
  for (int i=0; i<n; i++) if (a > A[i]) a = A[i];
  return a;
}

Compilation message

tutorial2.cpp:1:25: error: expected ',' or '...' before 'A'
 int GetMax(int n, int[] A) {
                         ^
tutorial2.cpp: In function 'int GetMax(int, int*)':
tutorial2.cpp:3:35: error: 'A' was not declared in this scope
   for (int i=0; i<n; i++) if (a > A[i]) a = A[i];
                                   ^