Question
Your task is to write a C++ program which computes the product of the series of integers within a bounded interval, having upper and lower
Your task is to write a C++ program which computes the product of the series of integers within a bounded interval, having upper and lower limits input by the user at the console (the keyboard, typically).
1. Your program should prompt the user for two integers, for example m and n, then compute and display the corresponding series product (the value of m (m + 1) (m + 2) . . . (n 1) n). (a) NOTE: your program should correctly identify the relative order of the two integers which are input (that is, the user might enter 4 7 or 7 4 and your program should produce the same result, in this case 840). Also, if the same integer is entered as both the upper and lower limit, the product of integers in the interval is assumed to be just that integer (if 7 7 is entered, the product should be 7). (b) You may assume that the user is skilled at data entry (only numeric values, no decimal points or commas or other strange punctuation). In other words, do not worry about the input being invalid.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started