Submission #14050

#TimeUsernameProblemLanguageResultExecution timeMemory
14050baji072최댓값 (tutorial2)C++98
Compilation error
0 ms0 KiB
#inclue<stdio.h> int main(){int n,a[999],m=0,i=0;scanf("%d",&n);for(;i<n;i++){scanf("%d",&a[i]);m=m<a[i]?a[i]:m;}printf("%d",m);}

Compilation message (stderr)

tutorial2.cpp:1:2: error: invalid preprocessing directive #inclue
 #inclue<stdio.h>
  ^
tutorial2.cpp: In function ‘int main()’:
tutorial2.cpp:2:46: error: ‘scanf’ was not declared in this scope
 int main(){int n,a[999],m=0,i=0;scanf("%d",&n);for(;i<n;i++){scanf("%d",&a[i]);m=m<a[i]?a[i]:m;}printf("%d",m);}
                                              ^
tutorial2.cpp:2:110: error: ‘printf’ was not declared in this scope
 int main(){int n,a[999],m=0,i=0;scanf("%d",&n);for(;i<n;i++){scanf("%d",&a[i]);m=m<a[i]?a[i]:m;}printf("%d",m);}
                                                                                                              ^