Using a while loop create a program that will prompt the user for a positive number and then print out a multiplication list of all the between the given number and one(inclusive), These are referred to as the factorial and it is only applicable for positive numbers.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter5: Repetition Statements
Section: Chapter Questions
Problem 9PP
icon
Related questions
Question

Using a while loop create a program that will prompt the user for a positive number and then print out a multiplication list of all the between the given number and one(inclusive), These are referred to as the factorial and it is only applicable for positive numbers.

Sample Run1

Enter a number: 4

Output1: Result = 4 x 3 x 2 x 1 = 24

Sample Run2

Enter a number: -6

Output2:  Result = Calculation not applicable to negative values

Sample Run 3

Enter a number: 0

Output2:  Result = 1

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,