Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
112193 张湘哲 删除数字字符 C++ Compile Error 0 MS 0 KB 275 2025-03-08 17:07:14

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ char s[1000001]; scanf("%s",str); for(int i=0;str[i]!='\0';i++) { if(str[i]>='0'&&str[i]<='9') continue; else cout<<str[i]; } cout<<endl; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:5:15: error: 'str' was not declared in this scope
    scanf("%s",str);
               ^
Main.cc:4:9: warning: unused variable 's' [-Wunused-variable]
    char s[1000001];
         ^