Suppose we declare the following variables: int count = 0; int iNumber = 1, previous = 1,
Question:
Suppose we declare the following variables:
int count = 0;
int iNumber = 1, previous = 1, product = 1;
Write the while loop that do the following if product is still less than 2022
-increase count by 1
-set previous equal to product
-lets the user enter a number for iNumber.
-multiply iNumber with product and the result is stored back to the variable product.
After the loop stop, display the output in the following format (for example)
At count = 3
Previous product = 782
Input number = 45
Product = 35190
2B
If product = 3000 instead of product = 1 at the beginning. How many times does the while loop iterate such that the product < 2022?
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill