2017年3月26日

写一个数的所有加法算式

摘要: #include #include int a[100]; void dfs(int rem,int prior,int i)//rem->remainder,i->the i-th number { if(rem=1) cout=1;j--) //the following value is less than of equal the prior {a[i]=j;... 阅读全文

posted @ 2017-03-26 19:14 ewitt 阅读(267) 评论(0) 推荐(0)

将字符串中的星号去掉

摘要: #include "iostream.h" #include "string.h" void main() { char a[]="******ab**c*****d*efgh****k***"; int i=0,starCnt=0; while (a[i]=='*') i++; while (a[i]!='\0') { if(a[i]==... 阅读全文

posted @ 2017-03-26 19:12 ewitt 阅读(3025) 评论(0) 推荐(0)

导航