| Repository | - gmplib.org/repo/ #include<stdio.h>
#include<gmp.h>
intmain(void){
mpz_tx,y,result;
mpz_init_set_str(x,"7612058254738945",10);
mpz_init_set_str(y,"9263591128439081",10);
mpz_init(result);
mpz_mul(result,x,y);
gmp_printf(
" %Zd\n"
"*\n"
" %Zd\n"
"--------------------\n"
"%Zd\n",
x,y,result
);
// free used memory
mpz_clear(x);
mpz_clear(y);
mpz_clear(result);
return0;
}
This code calculates the value of import<gmpxx.h>;
importstd;
intmain(){
mpz_classx("7612058254738945");
mpz_classy("9263591128439081");
mpz_classresult=x*y;
std::println(
" {}\n"
"*\n"
" {}\n"
"--------------------\n"
"{}",
x.get_str(),y.get_str(),result.get_str()
);
return0;
}
|
|---|