Submission #19236

#TimeUsernameProblemLanguageResultExecution timeMemory
19236middleageddr최댓값 (tutorial2)C++98
Compilation error
0 ms0 KiB

int GetMax(int N, int *A){

	int i, max;

	max = -1;
	for (i = 0; i < N; i++) {
		if (max < *(A + i)) max = *(A + i);

	return max;
}

Compilation message (stderr)

tutorial2.cpp: In function ‘int GetMax(int, int*)’:
tutorial2.cpp:11:1: error: expected ‘}’ at end of input
 }
 ^
tutorial2.cpp:11:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^