제출 #717839

#제출 시각아이디문제언어결과실행 시간메모리
717839EntityPlanttscanf 함수 3 (BSC_0_5)C++14
100 / 100
1 ms212 KiB
#include<cstdio> main(){int x;scanf("%d",&x);printf("%d",++x);}

컴파일 시 표준 에러 (stderr) 메시지

scanf3.cpp:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(){int x;scanf("%d",&x);printf("%d",++x);}
      | ^~~~
scanf3.cpp: In function 'int main()':
scanf3.cpp:2:19: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    2 | main(){int x;scanf("%d",&x);printf("%d",++x);}
      |              ~~~~~^~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...