1. Engineering
  2. Computer Science
  3. its c...

Question: its c...

Question details

1.9 Factorial In this lab, you will create a program that calculates the factorial of user input numbers. You will use a loop to crank out the factorial of a number, and another loop to ask the user for input until the user wants to stop. For review, the factorial of a number is symbolized with a and defined as: 0-1 1!-1 5!-5x4x3x2x1-120 n!-nx(n-1)x(n-2)x..x1 Note: the user should put in a negative number to stop. And use the type long long for the factorial, as it can get rather large Suggestion for writing. First make a loop that asks the user for numbers N but does NOT compute NL lt only should print N-dont know yet. After you get that working, you add a loop before the print line and that loop should multiply numbers up to N to get the answer Replace dont know with the answer, of course LAB ACTIVITY ACTVTY 1.9.1: Factorial main.cpp 3 using namespcae std;

It's C++

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution