#include<stdio.h>
#include<string.h>
#define n 100
int main(){
int i,j=0,k;
char str[n],temp[n]={0},max[n]={0};
gets(str);
for(i=0;i<=strlen(str);i++){
if(str[i]>='0'&&str[i]<='9'){
temp[j]=str[i];
j++;
}
else {
j=0;
if(strlen(temp)>strlen(max)){
for(k=0;k<=strlen(temp);k++){
max[k]=temp[k];
}
}
}
}
if(max[1]!=0) printf("%sn",max);
else printf("Non");
return 0;
}
最后
以上就是冷酷豌豆最近收集整理的关于7-1 查找字符串中最长的数字子串 (100 分)的全部内容,更多相关7-1内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复