Submission #513

#TimeUsernameProblemLanguageResultExecution timeMemory
513jwvg0425최댓값 (tutorial2)C++98
Compilation error
0 ms0 KiB
#include <stdio.h> int GetMax(N, A) { int i,m=A[0]; for(i=1;i<N;i++) { if(A[i]>m)m=A[i]; } return m; } int main() { int n,a[10],i; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%d",&a[i]); } printf("%d",GetMax(n,a)); }

Compilation message (stderr)

tutorial2.cpp:2:12: error: 'N' was not declared in this scope
tutorial2.cpp:2:15: error: 'A' was not declared in this scope
tutorial2.cpp:2:16: error: expression list treated as compound expression in initializer [-fpermissive]
tutorial2.cpp:3:1: error: expected ',' or ';' before '{' token