Question: C++ Using headers: Conio.h, iostream, ctime, string . Write a function ( function 1) that takes an integer and returns its number of divisors. Write

C++

Using headers: Conio.h, iostream, ctime, string .

Write a function ( function 1) that takes an integer and returns its number of divisors. Write another function ( function 2) that takes two integers and lists all integers that lie in between and including those two integers, followed by the number of divisors each of the integers in the given range has. It does that by calling (function 1) for each integer in the range which returns the number of divisors for each integer passed to it.

Write a third function (function 3) which takes an integer and returns true if it's a prime number and false, if it isn't. Pass those same two integers above entered by the user to a fourth function ( function 4) that prints all prime numbers in a given range of integers using (function 3) for each integer in the range. Printing the prime numbers in the range by (function 4) must confirm the results printed by ( function 1) before it since any integer with 2 divisors is a prime number.

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!