Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
106486 | 胡海峰老师 | 统计数字字符个数 | C++ | Compile Error | 0 MS | 0 KB | 232 | 2025-01-16 11:52:24 |
#include <iostream> using namespace std; int main(){ char s[256]; int num=0; cin.getline(s,256); int i=0; while(s[i]) { if( s[i]>='0' && s[i]<='9') num++; i++ } cout<< num; return 0; }
Main.cc: In function 'int main()': Main.cc:16:2: error: expected ';' before '}' token } ^