下载地址:
下载地址1(本站为飞网专业下载站,域名:down.cfei.net)
资源简介:
string plus_1(const string &a,const string &b){ string result; char ttemp[2]; int alen,blen,i,j; int add,temp; ttemp[1]='\0'; alen=a.size(); blen=b.size(); add=0; for(i=alen-1,j=blen-1;i>=0&&j>=0;i--,j--) { temp=add+((int)a[i]-48)+((int)b[j]-48); add=temp/10; ttemp[0]=temp%10+48; result.insert(0,ttemp); } while(i>=0) { for(;i>=0;i--) { temp=add+(a[i]-48); add=temp/10; ttemp[0]=temp%10+48; result.insert(0,ttemp); } } while(j>=0) { for(;j>=0;j--) { temp=add+(b[j]-48); add=temp
飞网下载站,免费下载共享资料,内容涉及教育资源、专业资料、IT资源、娱乐生活、经济管理、办公文书、游戏资料等。