Skip to content

Instantly share code, notes, and snippets.

@AndyNovo
Created September 23, 2016 15:42
Show Gist options
  • Save AndyNovo/e003b0ea6e2a79f37433085f76d90e8f to your computer and use it in GitHub Desktop.
Save AndyNovo/e003b0ea6e2a79f37433085f76d90e8f to your computer and use it in GitHub Desktop.
#include <iostream>
#include <gmp.h>
using namespace std;
int main(){
mpz_t x,y,z;
mpz_init(x);
mpz_init(y);
mpz_init(z);
mpz_set_str(x, "1234567890123456789012345678901234567890", 10);
mpz_set_str(y, "9876543210987654321098765432109876543210", 10);
mpz_add(z, x, y);
cout << z << endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment