Added more operations
This commit is contained in:
parent
971f13a59b
commit
6d15af8b86
3 changed files with 56 additions and 38 deletions
|
@ -7,17 +7,15 @@ using namespace gm3p;
|
|||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
gInt a("12234234234095780349859034869034635235", 10);
|
||||
gInt b("123534622305820985092875207398734234753", 10);
|
||||
gInt a("12");
|
||||
gInt b = -5;
|
||||
|
||||
a *= b;
|
||||
gInt c = a * b;
|
||||
|
||||
std::cout << std::dec << a << " * " << b << " = " << c << std::endl;
|
||||
std::cout << std::hex << a << " * " << b << " = " << c << std::endl;
|
||||
std::cout << std::oct << a << " * " << b << " = " << c << std::endl << std::endl << std::dec;
|
||||
std::cout << c << std::endl << std::endl;
|
||||
std::cout << -c << std::endl << std::endl;
|
||||
|
||||
int d = c;
|
||||
int d = Abs(c);
|
||||
std::cout << d << std::endl;
|
||||
std::cout << c.ToString(NULL, 2) << std::endl;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue