Question: Assignment (50 pts] 1. Write a program in C where you would perform the following tasks: a. Write a main() function where you will declare

 Assignment (50 pts] 1. Write a program in C where you

Assignment (50 pts] 1. Write a program in C where you would perform the following tasks: a. Write a main() function where you will declare an unsigned integer a. You can assign any value you like. (e.g. a = 4) b. Make a call to function factorial(...). You will pass the unsigned integer you defined earlier as an argument to the function call. You will define a function called factorial(...) that takes in an unsigned integer parameter. This function should have an unsigned integer return type. d. Do not use a standard C function that calculates factorial. Instead write your own for loop that calculates the result. e. Print a statement in a similar format from main() as shown below. For example, if the number passed into the function is 4, you program should print the following: 4 factorial is 24

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!