Submission #508

#TimeUsernameProblemLanguageResultExecution timeMemory
508ohchanghun25최댓값 (tutorial2)C++98
Compilation error
0 ms0 KiB
#include<stdio.h> int main() { int N, arr[100]; int i,Max=-1; scanf("%d",&N); for(i=0;i<N;i++) scanf("%d",&arr[i]); Max=arr[0]; for(i=1;i<N;i++) if(Max<arr[i]) Max=arr[i]; printf("%d",Max); }

Compilation message (stderr)

tutorial2.cpp: In function 'int main()':
tutorial2.cpp:8:16: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
tutorial2.cpp:11:22: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
/tmp/ccdsKpnm.o: In function `main':
tutorial2.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccGGQhy7.o:grader.cpp:(.text.startup+0x0): first defined here
/tmp/ccGGQhy7.o: In function `main':
grader.cpp:(.text.startup+0x97): undefined reference to `GetMax(int, int*)'
collect2: ld returned 1 exit status