| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 78137 | 张黄源 | 15几个数字组成 | C++ | Compile Error | 0 MS | 0 KB | 166 | 2024-06-16 15:18:46 |
#include<iostream> using namespace std; int main(){ int n,sum=0; cin>>n; int sum = 0; while(n != 0){ n = /10; sum++; } cout<<sum; return 0; }
Main.cc: In function 'int main()':
Main.cc:6:6: error: redeclaration of 'int sum'
int sum = 0;
^
Main.cc:4:8: note: 'int sum' previously declared here
int n,sum=0;
^
Main.cc:8:7: error: expected primary-expression before '/' token
n = /10;
^