Home /
Expert Answers /
Computer Science /
no-break-no-exits-are-supposed-to-be-used-nbsp-write-a-c-program-to-calculate-factorials-math-pa228
(Solved): no break no exits are supposed to be used Write a C program to calculate factorials ( \( \math ...
no break no exits are supposed to be used
Write a C program to calculate factorials ( \( \mathrm{n} ! \) ) for integer values that the user enters. More specifically, the program should do the following. 1. Use appropriate variable types for the calculations being performed. 2. Prompts the user to enter an integer less than 21 for which the program will calculate the factorial. 3. Calculate the factorial for the number entered if it is less than 21 , a. Use a loop to calculate the factorial of the value that was entered. 4. Print out the value the user entered and its factorial value. 5. Allow the user to keep entering additional integers obtain additional factorials. You have your choice of terminating the loop by: a. Having the user enter a 0 value, or b. Having them enter a ' \( q \) ' or other character that is not a number. Note: The Bloodshed Dev \( \mathrm{C} \) compiler may give you a warning message when using \%llu or \%lld output specifiers for long long integers; however, the program will still print out the information correctly. Remember that \( \mathrm{n} \) ! means \( 1 * 2 * 3^{*} \ldots *(\mathrm{n}-1)^{*} \mathrm{n} \).