这题没做,直接在网上看了别人的代码,对数字的一些问题不是很了解学习一下istringstream的用法:#include <iostream>#include <string>#include <sstream>//使用istringstream()需要调入的头文件using namespace std;string getMaxStr(){ int n=0x7fffffff; string s=""; while(n!=0) { s=(char)(n%10+'0')+s; n=n/10; } return s;}bool Read More
posted @ 2012-06-27 23:14 godjob Views(198) Comments(0) Diggs(0) Edit
#include <iostream>#include <algorithm>#include <cstring>using namespace std;int mutil(char * x, char * y , char * z){ char * px = x; char * py = y; int carry =0 , temp; if(strcmp(x,"0") == 0 || strcmp(y,"0") == 0) { z[0] = 0; return 1; } int i,j; for(i = 0 ; *( Read More
posted @ 2012-06-27 21:53 godjob Views(131) Comments(0) Diggs(0) Edit