Created
June 1, 2020 12:12
-
-
Save maidis/df582f34f9f5519bc5b681fe580e69a6 to your computer and use it in GitHub Desktop.
gmpxx1.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <gmpxx.h> | |
int main (void) | |
{ | |
mpz_class a, b, c; | |
a = 1234; | |
b = "-5678"; | |
c = a+b; | |
std::cout << "sum is " << c << "\n"; | |
std::cout << "absolute value is " << abs(c) << "\n"; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment