欢迎来到天天文库
浏览记录
ID:46462776
大小:30.00 KB
页数:4页
时间:2019-11-24
《用C++编写 字符串的处理程序》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、用C++编写字符串的处理程序#include#includeusingnamespacestd;intmain(){chara;charstr[6]="china";//定义一个字符串intorder,i,j,k,sum=0;cout<<"pleaseentertheorder:"<>order;if(order==1)cout<<"thesizeofthecharis:"<2、aceofthedealchari:"<>i;sum=i-1;cout<<"thecharintheispaceis:"<>i;i=i-1;cout<<"pleaseenterthenewchara:"<>a;cout<<"theresultis:"<3、out<<"str[i]="<>j>>k;if(j>0&&j<=k&&k<=5){cout<<"thestringwewantis:"<4、g!"<>k;k=k-1;if(k<=5){cout<<"thestringwewantis:"<5)c5、out<<"theorderisn'tright!"<
2、aceofthedealchari:"<>i;sum=i-1;cout<<"thecharintheispaceis:"<>i;i=i-1;cout<<"pleaseenterthenewchara:"<>a;cout<<"theresultis:"<3、out<<"str[i]="<>j>>k;if(j>0&&j<=k&&k<=5){cout<<"thestringwewantis:"<4、g!"<>k;k=k-1;if(k<=5){cout<<"thestringwewantis:"<5)c5、out<<"theorderisn'tright!"<
3、out<<"str[i]="<>j>>k;if(j>0&&j<=k&&k<=5){cout<<"thestringwewantis:"<4、g!"<>k;k=k-1;if(k<=5){cout<<"thestringwewantis:"<5)c5、out<<"theorderisn'tright!"<
4、g!"<>k;k=k-1;if(k<=5){cout<<"thestringwewantis:"<5)c
5、out<<"theorderisn'tright!"<
此文档下载收益归作者所有