Question: Write a program that asks the user for Po's whole number (between 1 and 30). The main function should prompt the user for a positive

Write a program that asks the user for Po's whole number (between 1 and 30). The main function should prompt the user for a positive integer between 1 and 30 (inclusive). Include validation to make sure the number is an integer within range. Then pass the number to another function declared as function factorial (num). The function factorial (num) will take in the number as an argument and calculate the factorial of the number. The factorial of a number n is defined a n! where n! = n* (n-1)* (n-2)* .. * 2* 1. The function factorial (num) will return the factorial value. You must use the specified function for this
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
