Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

New Skills Practiced (Learning Goals) Problem solving and debugging. Use of count-controlled loop. Nested loop. An abundant number is an integer greater than 0 such

New Skills Practiced (Learning Goals)

Problem solving and debugging.

Use of count-controlled loop.

Nested loop.

An abundant number is an integer greater than 0 such that the sum of its proper divisors is greater than the integer. For example, 12 is abundant because 1+2+3+4+6 = 16 which is greater than 12. A deficient number is an integer greater than 0 such that the sum of its proper divisors is less than the integer. For example, 8 is deficient because 1+2+4 = 7 which is less than 8. A perfect number is an integer greater than 0 such that the sum of its proper divisors is equal to the integer. For example, 6 is perfect because 1+2+3 = 6. for each of the data values, determines if the integer is abundant, deficient, perfect or neither and

displays a message that includes the integer and which of the 4 categories it falls into

if the integer is abundant, counts how many factors it has and displays a message that includes its factor count

NOTES:

Make sure you choose enough test data to ensure that your program meets all the requirements.

Sample terminal session: [keys]$ more data4seven 17 -5 246 [keys]$ g++ ex07.cpp [keys]$ ./a.out Enter the number. 17

17 is deficient

[keys]$ ./a.out Enter the number. -15 -15 is not abundant, deficient or perfect. [keys]$ ./a.out Enter the number. 246

246 is abundant and has 8 factors

*USE A FOR LOOP. THIS DOES NOT USE FSTREAM OR FUNCTIONS.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro PowerShell For Database Developers

Authors: Bryan P Cafferky

1st Edition

1484205413, 9781484205419

More Books

Students also viewed these Databases questions

Question

90 Basic budgeting and accounting concepts.

Answered: 1 week ago

Question

What is the difference between Needs and GAP Analyses?

Answered: 1 week ago

Question

What are ERP suites? Are HCMSs part of ERPs?

Answered: 1 week ago