Write a program that takes a positive integer number from


This is the exact prompt by the way. if you find anything else you might be able to help me with just send me a message. Thank you for the earlier response as well Direction.

Write a program that takes a positive integer number from user and outputs the number in the range from 1 to whatever user has entered with maximum sum of its divisors. The maximum sum of divisors should be outputted as well.

Please insert your name as a comment in the beginning of your code. Your should submit me your source code (.cpp file). Make sure your program works and does what it is supposed to be doing. The program that doesn't compile or doesn't output the correct result is 0 points. Remember that your programming style is also evaluated. Do not forget to test your program before submission! Remember, program that doesn't do what it is supposed to be doing worth 0 points.

Detailed description of the program is the following:

1. Your program outputs an invitation for user to enter positive integer number and gets the input on the same line.

2. If user inputs non-positive number then force user to reenter the number over and over again until user finally gets it right.

3. Check the whole range of numbers from 1 to whatever user has entered and find a number with the largest sum of its divisors. Output that number and the sum of its divisors on the screen in the following format: "Number 8 has a muximum sum of divisors 15" (where numbers 8 and 15 should, obviously, be replaced by the correct answers). A new line should be started after the output.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Write a program that takes a positive integer number from
Reference No:- TGS01402355

Now Priced at $30 (50% Discount)

Recommended (93%)

Rated (4.5/5)