Advanced Repetition

Hi
I should write this assignment with C++, visual studio, which focuses on creating and manipulating repetition control structures.

I appreciate it in advance.
Regards


Instructions

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.
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



Why not try it out first ? We'll help u but no one here will do it for u...
Topic archived. No new replies allowed.