摘要:
假定两个数都为非负数,将长整数作为字符串进行处理。1. 加法 1 #include 2 #include 3 using namespace std; 4 5 int ch2int(char ch) 6 { 7 return ch-'0'; 8 } 9 10 int int2ch(int i)11 {12 return i+'0';13 }14 15 string clear(string str)16 {17 //remove extra zeros18 int pos = str.find_first_not_of('0');19 if(po 阅读全文
posted @ 2013-11-03 22:00
peach_planet
阅读(430)
评论(0)
推荐(0)

浙公网安备 33010602011771号