| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 63503 | 万隽宇 | 字符串中最大的数字 | C++ | Compile Error | 0 MS | 0 KB | 232 | 2024-01-08 19:23:23 |
# include<iostream> # include<cstring> using namespace std; int main(){ char a[1001],d='0'; int n; cin>>a>>s; c=strlen(a); for(int i=0;i<c;i++){ if(a[i]>d){ d=a[i]; } } cout<<d; return 0; }
Main.cc: In function 'int main()':
Main.cc:7:9: error: 's' was not declared in this scope
cin>>a>>s;
^
Main.cc:8:1: error: 'c' was not declared in this scope
c=strlen(a);
^
Main.cc:6:5: warning: unused variable 'n' [-Wunused-variable]
int n;
^