Submission #717841

# Submission time Handle Problem Language Result Execution time Memory
717841 2023-04-02T16:04:51 Z EntityPlantt scanf 함수 5 (BSC_0_7) C++14
0 / 100
1 ms 284 KB
#include<cstdio>
main(){float a,b;scanf("%f%f",&a,&b);printf("%f",(a+b)/2.0);}

Compilation message

scanf5.cpp:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(){float a,b;scanf("%f%f",&a,&b);printf("%f",(a+b)/2.0);}
      | ^~~~
scanf5.cpp: In function 'int main()':
scanf5.cpp:2:23: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    2 | main(){float a,b;scanf("%f%f",&a,&b);printf("%f",(a+b)/2.0);}
      |                  ~~~~~^~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 284 KB Output isn't correct
2 Halted 0 ms 0 KB -