Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
148700 王峻熙 12自由落体 C++ Compile Error 0 MS 0 KB 338 2026-02-28 15:18:17

Tests(0/0):


Code:

#include<iostream> //cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> //strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() usingnamespacestd; intmain(){ doubleh=100; for(inti=1;i<=10;i++){ h=h/2; } printf("%.6lf",h);


Run Info:

Main.cc:5:1: error: 'usingnamespacestd' does not name a type
 usingnamespacestd;
 ^
Main.cc:6:9: error: ISO C++ forbids declaration of 'intmain' with no type [-fpermissive]
 intmain(){
         ^
Main.cc: In function 'int intmain()':
Main.cc:7:5: error: 'doubleh' was not declared in this scope
     doubleh=100;
     ^
Main.cc:8:9: error: 'inti' was not declared in this scope
     for(inti=1;i<=10;i++){
         ^
Main.cc:8:16: error: 'i' was not declared in this scope
     for(inti=1;i<=10;i++){
                ^
Main.cc:9:9: error: 'h' was not declared in this scope
         h=h/2;
         ^
Main.cc:11:20: error: 'h' was not declared in this scope
     printf("%.6lf",h);
                    ^
Main.cc:11:22: error: expected '}' at end of input
     printf("%.6lf",h);
                      ^
Main.cc:11:22: warning: no return statement in function returning non-void [-Wreturn-type]