This is the last thing to do this quarter and it will make a pass/fail difference for me. I need some substantial help.

This is the problem:

Create a program called repetitionAdvanced.c that does the following:

Prompt the user and accept a positive whole number of up to 512 digits

Prompt the user and accept a second positive whole number of up to 512 digits whose value is less than the first number

Display the sum of the two numbers

Display difference of the second number subtracted from the first number

You program may use the stdlib.h, stdio.h, string.h, and math.h libraries if desired. No other libraries or external code may be used. Note the that whole number values are much larger that any that can be represented with integer variables, and have more precision that can be represented by floating point variables, so you must devise a different method of representing the values, e.g. strings or other non-numeric data types.

Your program must adhere to the class coding standards, and will be graded using the assignment grading criteria.

Sample Output

Program: Advanced Repetition

Author: Doug Jones

Enter a whole number: 1234567890123456789012345678901234567890

Enter a whole number: 9999999999999999999

The sum is: 1234567890123456789022345678901234567889

The difference is: 1234567890123456789002345678901234567891

PLEASE HELP!!! From what I understand, this would work best with an array[512] filled from the back to front, but I need help on how to do that and code this sucker up. THANK YOU!!

This is the problem:

Create a program called repetitionAdvanced.c that does the following:

Prompt the user and accept a positive whole number of up to 512 digits

Prompt the user and accept a second positive whole number of up to 512 digits whose value is less than the first number

Display the sum of the two numbers

Display difference of the second number subtracted from the first number

You program may use the stdlib.h, stdio.h, string.h, and math.h libraries if desired. No other libraries or external code may be used. Note the that whole number values are much larger that any that can be represented with integer variables, and have more precision that can be represented by floating point variables, so you must devise a different method of representing the values, e.g. strings or other non-numeric data types.

Your program must adhere to the class coding standards, and will be graded using the assignment grading criteria.

Sample Output

Program: Advanced Repetition

Author: Doug Jones

Enter a whole number: 1234567890123456789012345678901234567890

Enter a whole number: 9999999999999999999

The sum is: 1234567890123456789022345678901234567889

The difference is: 1234567890123456789002345678901234567891

PLEASE HELP!!! From what I understand, this would work best with an array[512] filled from the back to front, but I need help on how to do that and code this sucker up. THANK YOU!!

Last edited on

Topic archived. No new replies allowed.