Submission #514

#TimeUsernameProblemLanguageResultExecution timeMemory
514jwvg0425최댓값 (tutorial2)C++98
Compilation error
0 ms0 KiB
#include <stdio.h> int GetMax(int N,int* 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: In function 'int main()':
tutorial2.cpp:14:17: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
tutorial2.cpp:17:22: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
/tmp/ccKkEWxI.o: In function `main':
tutorial2.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccn7Nokp.o:grader.cpp:(.text.startup+0x0): first defined here
collect2: ld returned 1 exit status