Question: Instructions: 1 . Create Using MATLAB 2 . Create the program using the while - loop command. 3 . Create a program that calculates the

Instructions:
1. Create Using MATLAB
2. Create the program using the while-loop command.
3. Create a program that calculates the factorial of a number n, entered by the user. The program will NOT use the MATLAB function that calculates the factorial. Create the program with the mechanics of the function that states that the factorial of a number n is n * n-1* n-2* n-3*...(1)
Example. The factorial of 7 will be 7*6*5*4*3*2*1
- The user enter n, and your program must calculate the value of n!
- Create the mechanism to warn the user if that has an error when enter a negative number to calculate the factorial.- Also, set the condition so that when the number n is zero the result by definition is 1. So the factorial of zero is 1.
- Print the result in complete sentence that reads: The factorial of [should appear here the number entered by the user] is [the result you have computed]
- The program and printed results should be clear and presented in the best way.

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!