Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
83702 叶城俊 12自由落体 C++ Compile Error 0 MS 0 KB 168 2024-07-14 16:32:57

Tests(0/0):


Code:

#include <iostream> using namespace std ; int main (){ double h=100; for(int i;i=1;1<=10;i++){ h=h/2; } printf("%.6lf",h); return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:5:17: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
     for(int i;i=1;1<=10;i++){
                 ^
Main.cc:5:22: warning: for increment expression has no effect [-Wunused-value]
     for(int i;i=1;1<=10;i++){
                      ^
Main.cc:5:24: error: expected ')' before ';' token
     for(int i;i=1;1<=10;i++){
                        ^
Main.cc:5:25: error: 'i' was not declared in this scope
     for(int i;i=1;1<=10;i++){
                         ^