Question: 1 ) 1 0 points: - define a function in the appendix named factorial with the input n and the output fact - within the

1)10 points:
- define a function in the appendix named factorial with the input n and
the output fact
- within the function factorial initialize fact with 1
- write a loop over i from 1 to in with increments of 1 and in each loop
iteration carry out: fact = fact*i;
- define a variable n and set it to 5
- call the function factorial and pass in n as an input and store the
returned vale in the variable result
- display the variable result
MATLAB

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 Programming Questions!