Question: C++ You will ask the user which problem to run from the main function: Problem #? (1,2): Use a switch/case type statement to determine which

C++

You will ask the user which problem to run from the main function:

Problem #? (1,2):

Use a switch/case type statement to determine which was chosen. Call a function to handle each type, such as problem1(), problem2(). Any functions you create should be placed after the main() function and thus require a prototype before main().

PROBLEM 1-------------------------------------------------

Write a function that returns nothing and takes no parameters to take 5 integers from the user, place them in an array, then print them out in reverse order.

Example Output------------

Problem #? (1,2,3):1

Enter 5 integers :1

2

3

4

5

In reverse order:5 , 4 , 3 , 2 , 1

PROBLEM 2----------------------------------------

Create a function that takes 5 integers from the user

The array will be passed to a function that displays which ones of those 5 integers are evenly divisible by 3

Example Output-------------------------

Problem #? (1,2):2

Enter 5 integers you wish to check for divisiblity by 3:1

5

11

30

33

Number 1 is not divisible by 3.

Number 5 is not divisible by 3.

Number 11 is not divisible by 3.

Number 30 is divisible by 3.

Number 33 is divisible by 3.

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!