Question: C++ //Write prototype for function factorial that accepts an int num and returns an int /* WITH LOOP OF YOUR CHOICE: Write code for function

C++

//Write prototype for function factorial that accepts an int num and returns an int

/*

WITH LOOP OF YOUR CHOICE:

Write code for function factorial that accepts an int num

and returns the num's factorial

factorial(5);

1*2*3*4*5

returns 120

DON'T FORGET TO WRITE TEST CASE.

*/

//write includes statements

//write using statements for cin and cout

/*

Use a do while loop to prompt the user for

a number, call the factorial function, and display the number's

factorial. Also, loop continues as long as user wants to.

*/

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!