Created
June 1, 2020 12:42
-
-
Save maidis/13dd67ffcbce31a9ec7e6b1200b22940 to your computer and use it in GitHub Desktop.
gmpxx2.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; | |
b = 12; | |
c = 5; | |
mpz_gcd (a.get_mpz_t(), b.get_mpz_t(), c.get_mpz_t()); | |
std::cout << "GCD of " << b << " and " << c << " is " << a << ".\n"; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment