Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
134861 田祥江 字符串中最大的数字 C++ Compile Error 0 MS 0 KB 232 2025-11-01 16:47:25

Tests(0/0):


Code:

#include<iostream> using namespace std; char s[1005]; int main(){ cin>>s; char max='0'; int len=strlen(s); for(int i=0;i<len;i++){ if(s[i]>max){ max=s[i]; } } cout<<max; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:7:21: error: 'strlen' was not declared in this scope
     int len=strlen(s);
                     ^