c++题目 急~~~

[复制链接]
查看11 | 回复1 | 2009-6-6 21:20:18 | 显示全部楼层 |阅读模式
#include#include#includeusing namespace std;void main(){ int i,j=0,n=0; char s[80]={0};; char s1[80]={0}; char s2[80]={0}; cout>s; int num=strlen(s); cout<<num; for(i=0;i<num;i++) {if(isalpha(s)) { s1[j]=s; j++;}else { s2[n]=s; n++;} } strcat(s1,s2); cout<<s1;}
回复

使用道具 举报

千问 | 2009-6-6 21:20:18 | 显示全部楼层
后面加两句 } } s1[j]='\0'; s2[n]='\0'; strcat(s1,s2); cout<<s1;}
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行