bign类C++高精度模板(二)
= b);
}
bool operator <= (const bign &b)
{
return *this < b || *this == b;
}
bool operator >= (const bign &b)
{
return *this > b || *this == b;
}
string str() const
{
string res = "";
for(int i = 0; i < len; i++) res = char(s[i]+'0') + res;
return res;
}
};
istream& operator >> (istream &in, bign &x)
{
string s;
in >> s;
x = s.c_str();
return in;
}
ostream& operator << (ostream &out, const bign &x)
{
out << x.str();
return out;
}
int main()
{
bign a, b, c, d, e, f, g;
while(cin>>a>>b)
{
a.clean(), b.clean();
c = a+b;
d = a-b;
e = a*b;
f = a/b;
g = a%b;