Hi all,
I have this code:
Code:
#include <stdio.h>
#include <gmp.h>
int main (int argc, char* argv[])
{
printf("Here!");
mpz_t b, x, r;
if (argc != 2) {
printf("Help");
return 2;
}
mpz_init(b);
mpz_init(x);
mpz_init(r);
gmp_sscanf(argv[1], "%Zd", b);
gmp_sscanf(argv[2], "%Zd", x);
printf("X = %Zd Y = %Zd",b,x);
mpz_mul(r, b, x);
gmp_printf("%Zd * %Zd = \n", b, x, r);
printf("Entered");
return 0;
}
The mutliplication is not working. Actually, it prints only the first print
statement : Here!.
Any suggestions?