Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
79162 张黄源 消消乐 C++ Compile Error 0 MS 0 KB 212 2024-06-30 14:34:57

Tests(0/0):


Code:

#include<iostream> using namespace std; int main(){ int a,b,c; for(int = 100; i <= 999; i++){ a = i%10; b = i/10%10; c = i/100%10; if(a == b&&b == c){ cout<<i<<" "; } } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:5:10: error: expected unqualified-id before '=' token
  for(int = 100; i <= 999; i++){
          ^
Main.cc:5:10: error: expected ';' before '=' token
Main.cc:5:10: error: expected primary-expression before '=' token
Main.cc:5:17: error: 'i' was not declared in this scope
  for(int = 100; i <= 999; i++){
                 ^
Main.cc:5:25: error: expected ')' before ';' token
  for(int = 100; i <= 999; i++){
                         ^
Main.cc:5:27: error: 'i' was not declared in this scope
  for(int = 100; i <= 999; i++){
                           ^
Main.cc:4:6: warning: unused variable 'a' [-Wunused-variable]
  int a,b,c;
      ^
Main.cc:4:8: warning: unused variable 'b' [-Wunused-variable]
  int a,b,c;
        ^
Main.cc:4:10: warning: unused variable 'c' [-Wunused-variable]
  int a,b,c;
          ^