C++

Brandon G.

asked • 11/12/21

Computer Science I

#include <iostream>
using namespace std;
// This function RECEIVES the lower and upper boundaries of a range of whole numbers, and a divisor.
// It counts all the numbers within the specified range (boundaries included) that are divisible by the
// divisor received.
// Once the counting is finished, the function RETURNS the count to main(). MUST use a LOOP to
// implement the count (do NOT calculate it, you will NOT get any credit for that).

countDiv ( )
{

}

int main()
{
// Declare variable(s)

// Prompt the user to enter the range's lower and upper boundaries

// Get the values from the keyboard and store them in the corresponding variables

// Prompt the user to enter the divisor

// Get the value from the keyboard and store it in the corresponding variable

// Display the count of numbers divisible by divisor returned by the function

return 0;
}

I am having trouble with the function definition on how to get the range of numbers and get the numbers divisible.

1 Expert Answer

By:

Jason C. answered • 02/15/23

Tutor
New to Wyzant

College-level Computer Science student

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.