제출 #14050

#제출 시각아이디문제언어결과실행 시간메모리
14050baji072최댓값 (tutorial2)C++98
컴파일 에러
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);}

컴파일 시 표준 에러 (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);}
                                                                                                              ^