Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
114649 唐俊逸 12自由落体 C++ Compile Error 0 MS 0 KB 4323 2025-03-22 19:09:53

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() using namespace std; int main(){ double h=100; for ( i=1;i<=10;i++){; h=h/2; } printf("%d",h); return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:9:11: error: 'i' was not declared in this scope
     for ( i=1;i<=10;i++){;
           ^
Main.cc:12:18: warning: format '%d' expects argument of type 'int', but argument 2 has type 'double' [-Wformat=]
     printf("%d",h);
                  ^