Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

It's C++ 1.9 Factorial In this lab, you will create a program that calculates the factorial of user input numbers. You will use a loop

image text in transcribed

It's C++

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 "don't know with the answer, of course LAB ACTIVITY ACTVTY 1.9.1: Factorial main.cpp 3 using namespcae std

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Students also viewed these Databases questions

Question

How does a period cost differ from a product cost?

Answered: 1 week ago

Question

Methods of Delivery Guidelines for

Answered: 1 week ago