Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
81979 杜奕辰 删除数字字符 C++ Compile Error 0 MS 0 KB 226 2024-07-12 16:33:23

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main() { char n[10000000]; cin>>n; while(int i=0; n[i]!='\0'; i++) if(n[i]<'0'||n[i]>'9') { cout<<n[i]; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:6:18: error: expected ')' before ';' token
     while(int i=0; n[i]!='\0'; i++)
                  ^
Main.cc:6:15: warning: unused variable 'i' [-Wunused-variable]
     while(int i=0; n[i]!='\0'; i++)
               ^
Main.cc:6:22: error: 'i' was not declared in this scope
     while(int i=0; n[i]!='\0'; i++)
                      ^