Question: C++ Programming: You must use a while do-while loop and two for loops as instructed for this task. Do not use functions, arrays or struct

C++ Programming: You must use a while do-while loop and two for loops as instructed for this task. Do not use functions, arrays or struct etc.  C++ Programming: You must use a while do-while loop and two

2. (10 marks) write a program that classifies each member of a set of five integers greater than 1 as abundant, perfect, or deficient. All other integers are flagged as errors. After classifying the set of integers the program prompts to determine ifthe user would like to do this again. If the sum of an integer's proper divisors is greater than the integer, then the integer is abundant (1 2 3 4 6 16 12 so 12 is abundant). If the sum of an integer's proper divisors is equal to the integer, then the integer is perfect (1 2 3 6 so 6 is perfect) If the sum of an integer's proper divisors is less than the integer, then the integer is deficient (1 3 9 13 27 so 27 is deficient) You must use a do while loop to implement asking the user ifthey wish to try again; a for loop to implement processing five integers; and a for loop to test all the possible divisors from 2 up to half the integer being tested. Your program should act EXACTLY as seen in the test runs below (including alignment). Test Run 1: Enter five integers 20 2 28 22 56 1+2+4+5+10 22 20 so 20 is abundant. 2 ERROR -2 is not greater than 1 1+2+4+7+14 28-28 so 28 is perfect. 1+2+11 14 22 so 22 is deficient lt 2+4+7+8+14+28 64 56 so 56 is abundant Do you want to try again (Y/N)? Y Enter five integers 0 5 36 25 0 ERROR: 0 is not greater than l 36 ERROR: 36 is not greater than 1 1+5-6

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!