답안 #243458

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
243458 2020-07-01T08:19:38 Z prarie 최댓값 (tutorial2) C++14
컴파일 오류
0 ms 0 KB
int GetMax(int N, int *A){
	int ans = a[0];
	for (int i = 1; i < N; i++) {
		if (ans < a[i]) ans = a[i];
	}
	return ans;
}

Compilation message

tutorial2.cpp: In function 'int GetMax(int, int*)':
tutorial2.cpp:3:12: error: 'a' was not declared in this scope
  int ans = a[0];
            ^