Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ please Introduction to programming in C++ CPS 171 - Machine Problem 4 - Repetition An abundant number is a natural number the sum of

image text in transcribedC++ please

Introduction to programming in C++ CPS 171 - Machine Problem 4 - Repetition An "abundant" number is a natural number the sum of whose proper divisors is greater than the number itself. The "proper" divisors of a number are the factors of the number that are less than the number. A "natural" number is {1,2,3} FOR EXAMPLE: THE NUMBER 8 IS NOT AN ABUNDANT NUMBER The proper divisors of 8 are 1,2 , and 4 The sum of the proper divisors is 1+2+4 or 7 which is less than the number 8 . There are 3 proper divisors for the number 8 THE NUMBER 12 IS AN ABUNDANT NUMBER The proper divisors of 12 are 1,2,3,4, and 6 The sum of the proper divisors is 1+2+3+4+6 or 16 which is greater than the number 12 . There are 5 proper divisors for the number 12 Write a program which finds and writes all the abundant numbers which are smaller or equal to the smallest natural number that has exactly six proper divisors. For each of the abundant numbers that it finds, the program output should include: - that particular abundant number, - the list of its proper divisors, - the sum of those divisors, - the total number of proper divisors - the appropriate messages. Finally, print out the natural number that has exactly six proper divisors. As usual, your program must be written in good style and include appropriate documentation. Please submit the .cpp files and the output file for grading

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

Step: 3

blur-text-image

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

DNA Databases

Authors: Stefan Kiesbye

1st Edition

0737758910, 978-0737758917

More Books

Students also viewed these Databases questions

Question

b. What groups were most represented? Why do you think this is so?

Answered: 1 week ago