Submission #16354

# Submission time Handle Problem Language Result Execution time Memory
16354 2015-08-21T14:22:06 Z eaststar scanf 함수 5 (BSC_0_7) C++14
Compilation error
0 ms 0 KB
main(){int a,b;scanf("%d%d",&a,&b);printf("%g",double(a+b)/2);}

Compilation message

scanf5.cpp:1:6: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type]
 main(){int a,b;scanf("%d%d",&a,&b);printf("%g",double(a+b)/2);}
      ^
scanf5.cpp: In function ‘int main()’:
scanf5.cpp:1:34: error: ‘scanf’ was not declared in this scope
 main(){int a,b;scanf("%d%d",&a,&b);printf("%g",double(a+b)/2);}
                                  ^
scanf5.cpp:1:61: error: ‘printf’ was not declared in this scope
 main(){int a,b;scanf("%d%d",&a,&b);printf("%g",double(a+b)/2);}
                                                             ^