Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Large Ineger Enhance the Large Integer Program by adding the following functions

ID: 3540609 • Letter: L

Question

Large Ineger

Enhance the Large Integer Program by adding the following functions. Assume that the first large integer is always bigger than the second large integer for subtraction and division.


/* Converts an integer to LargeInt */
LIST* IntToLargeInt(int n);


/* Converts LargeInt to Integer*/
int LargeIntToInt(LIST *L);

/* The function returns: */
/* 1 if first is greater than the second */
/* 1 if first is less than the second */
/* 0 if first is equal to the second */
int CompareTo(LIST* first, LIST* second);

/* Returns the result of multiplying first by second. */
LIST* MultiplyLargeInt(LIST* first, LIST* second);


/* Returns the the quotient of dividing first by second. */
LIST* DivideLargeInt(LIST* first, LIST* second);


/* Returns the the remainder of dividing first by second. */
LIST* RemainderLargeInt(LIST* first, LIST* second);


Also, design a client program that uses a menu to allow the user to add, multiply. subtract, divide, calculate factorial, and test prime number on integers.

Processing Notes:
There are two ways to implement multiplication and division. One is to use repeated addition (or subtraction); the other is to simulate how we do multiplication (and division) by hand.

Explanation / Answer

can you share your list class code ..as question says enhance the lage interger program..so i am.assuming there is an existing list class on which you want to add these functions..