Need help with C++ coding
Project 3-2: Factorial Calculator Create a program that calculates the factorial of the number entered by the user. Console Factorial Calculator Enter an integer (1-10): 3 The factorial of 3 is 6. Press y to continue or others to quit: y Enter an integer (1-10): 4 The factorial of 4 is 24. Press y to continue or others to quit: y Enter an integer (1-10): 9 The factorial of 9 is 362880. Press y to continue or others to quit: n Bye! Specifications . The exclamation point is used to identify a factorial. For example, the factorial of the number n is denoted by n!. Here's how you calculate the factorial of the numbers 1 through 5: 1!= 1 which equals 1 which equals 2 2!= 1* 2 3! = 1 * 2 * 3 which equals 6 4! = 1 * 2 * 3 * 4 which equals 24 5! = 1 * 2 * 3 * 4* 5 which equals 120 • Use a for loop to calculate the factorial. . Assume that the user will enter valid numeric data. . The program should continue only if the user enters "y" or "Y".
Need help with C++ coding
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am