Question: Homework # 2 4 8 Write a program that calculates the factorial of a number given by the user using three different types of loops,
Homework #
Write a program that calculates the factorial of a number given by the user using three different types of loops, ie
a for loop
a while loop
a do while loop
Your code must not only calculate the factorial but also display the process steps, eg for :
Make sure that you check the given number to be a positive integer not very big or else the result cannot fit in a variable of integer type int You can use any method to determine the maximum input number.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
