| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 157624 | 汪明轩 | 字符串中最大的数字 | C++ | Compile Error | 0 MS | 0 KB | 240 | 2026-08-08 10:34:20 |
#include<iostream> using namespace std; int main(){ int a[13],n,i=0,max; cin>>n; while(n>0){ i++; a[i]=n%10; n/10; } max=a[1] for(int j=1;j<=i;j++){ if(a[i]>max){ max=a[i]; } } cout<<max; return 0; }
Main.cc: In function 'int main()':
Main.cc:9:4: warning: statement has no effect [-Wunused-value]
n/10;
^
Main.cc:12:2: error: expected ';' before 'for'
for(int j=1;j<=i;j++){
^
Main.cc:12:14: error: 'j' was not declared in this scope
for(int j=1;j<=i;j++){
^