#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "gmp.h"
int main (int argc, char* argv[]){
    mpz_t int1,int2,int_result;
    char string_buf[50];
    /*Initialize the big integers*/
    mpz_init (int1);
    mpz_init (int2);
    mpz_init(int_result);
    /*The inputs are strings that have to be converted*/
    printf("input first number(x)\n");
    scanf("%s",string_buf);
     mpz_set_str (int1,string_buf, 10);
    printf("input second number(y)\n");
    scanf("%s",string_buf);
    mpz_set_str (int2,string_buf, 10);
     /*Calculate the sum, difference, product, quotient and remainder*/
    mpz_add(int_result,int1,int2);
    printf("x+y=");
    mpz_out_str (stdout, 10, int_result);
    printf("\n");
    mpz_sub(int_result,int1,int2);
    printf("x-y=");
    mpz_out_str (stdout, 10, int_result);
    printf("\n");
     printf("x*y=");
     mpz_mul(int_result,int1,int2);
    mpz_out_str (stdout, 10, int_result);
    printf("\n");
    printf("x/y=");
     mpz_tdiv_q(int_result,int1,int2);
    mpz_out_str (stdout, 10, int_result);
    printf("\n"); 
    printf("rem(x,y)=");
    mpz_tdiv_r(int_result,int1,int2);
    mpz_out_str (stdout, 10, int_result);
    printf("\n");
    return 0;
    }
    

/*----------------------------------------------------------------*/ /* Brought To You By CToHTML http://www.cs.washington.edu/homes/zahorjan/homepage/Tools/index.htm */ /*----------------------------------------------------------------*/