BigInt类表示不超过100位的无符号大整数。试重载>>,<<和+,以支持无符号大整数的输入、输出与求和(假设结果仍是一个不超过100位的无符号大整数)。
重载面向BigInt类对象的运算符:
/>>
<<
+
裁判测试程序样例:
#include <iostream>
#include <string>
using namespace std;
/* 请在这里填写答案 */
int main(){
BigInt a, b, c;
cin>>a>>b;
c=a+b;
cout<<a<<"+"<<b<<"="<<c<<endl;
return 0;
}
输入样例:
123456789
987654321
输出样例:
123456789+987654321=1111111110
答案 友情链接大佬的 :https://blog.csdn.net/zhaoxiy/article/details/105791532