Question: using visual studio please The factorial of a positive integer n (written as nel is computed as follows: n! = 1 x 2 x 3

 using visual studio please The factorial of a positive integer n

using visual studio please

The factorial of a positive integer n (written as nel is computed as follows: n! = 1 x 2 x 3 x ... *(n-1) xn In addition, if n = 0, then n!= 1 Write a C++ program that asks the user to enter a positive integer value and prints out its factorial, then the program asks the user if the program should exit or repeat again. If the user enters a negative value the program displays a warning message "You entered a negative number" then the program asks the user if the program should exit or repeat again. In the previous cases, the user selects to exit by entering 'e' or 'E' at the keyboard. Your C++ program should be checked for the following: - Use a do-while loop in which the program: *) asks the user to enter a positive number. *) checks if the entered value is positive. ) if the user entered a positive value, the program uses a for loop to calculate the factorial of the entered number based on the formula above, then prints the result on the screen. -) else if the user entered a negative value, the program warns the user about the invalid entry *) the program asks the user at the end of the loop whether they want to exit or not

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!