Iterative problems 1. The Main Street Boutique is having a five-day sale. Each day, starting on Monday, the price will drop 10% off the previous day's price. For example, if the original price of a product is $20.00, the sale price on Monday would be $18.00 (10% less than original price). On Tuesday the price would be $16.20 (10% less than Monday). On Wednesday the price would be $14.58; on Thursday the sale price would be $13.12 and on Friday the sale price would be 11>81. Develop a solution that will calculate the price of an item for each of the five days, given the original price. Test the solution for an item costing $10.00. 2. Make changes in the solution to problem 1 to set the price at wholesale when the price drops below the wholesale price. Test the solution with the following prices: Retail Prices: $20.00, $25.00 Wholesale Prices $10.00, $20.00

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

CC+

10:00
Iterative problems
1. The Main Street Boutique is having a five-day sale.
Each day, starting on Monday, the price will drop
10% off the previous day's price. For example, if
the original price of a product is $20.00, the sale
price on Monday would be $18.00 (10% less than
original price). On Tuesday the price would be
$16.20 (10% less than Monday). On Wednesday
the price would be $14.58; on Thursday the sale
price would be $13.12 and on Friday the sale price
would be 11>81. Develop a solution that will
calculate the price of an item for each of the five
days, given the original price. Test the solution for
an item costing $10.00.
2. Make changes in the solution to problem 1 to set the
price at wholesale when the price drops below the
wholesale price. Test the solution with the
following prices:
Retail Prices:
$20.00, $25.00
Wholesale Prices
$10.00, $20.00
3. Develop a solution that will calculate the average
temperature, given a set of temperatures. The
number of temperatures may vary from time to
time. (Use a trip value (counter) to stop the
processing of the loop.) Test the solution with the
following 10 temperatures
78, 90, 85, 80, 87, 83, 75, 90, 86 and 70
4. Mr. Nields has given a test to his class. He would
like to have the average score for the class as well
as the highest and lowest scores. Develop a
solution to calculate and display these values. (Use
a counter to stop the processing of the loop.)
5. Susan is hired for a job, and her employer agrees to
pay her every day. Her employer also agrees that
Susan's salary is one penny the first day, two
pennies the second day, four pennies the third day,
and continuing to double each day. Given the
number of days that she will work, write an
algorithm that will calculate her total pay.
So......would you want this job? Using a calculator,
test it using 10 days, 50 days, and 100
days.....so....do you want this job now?
AA
os.content.blackboardcdn.com
Ć
Transcribed Image Text:10:00 Iterative problems 1. The Main Street Boutique is having a five-day sale. Each day, starting on Monday, the price will drop 10% off the previous day's price. For example, if the original price of a product is $20.00, the sale price on Monday would be $18.00 (10% less than original price). On Tuesday the price would be $16.20 (10% less than Monday). On Wednesday the price would be $14.58; on Thursday the sale price would be $13.12 and on Friday the sale price would be 11>81. Develop a solution that will calculate the price of an item for each of the five days, given the original price. Test the solution for an item costing $10.00. 2. Make changes in the solution to problem 1 to set the price at wholesale when the price drops below the wholesale price. Test the solution with the following prices: Retail Prices: $20.00, $25.00 Wholesale Prices $10.00, $20.00 3. Develop a solution that will calculate the average temperature, given a set of temperatures. The number of temperatures may vary from time to time. (Use a trip value (counter) to stop the processing of the loop.) Test the solution with the following 10 temperatures 78, 90, 85, 80, 87, 83, 75, 90, 86 and 70 4. Mr. Nields has given a test to his class. He would like to have the average score for the class as well as the highest and lowest scores. Develop a solution to calculate and display these values. (Use a counter to stop the processing of the loop.) 5. Susan is hired for a job, and her employer agrees to pay her every day. Her employer also agrees that Susan's salary is one penny the first day, two pennies the second day, four pennies the third day, and continuing to double each day. Given the number of days that she will work, write an algorithm that will calculate her total pay. So......would you want this job? Using a calculator, test it using 10 days, 50 days, and 100 days.....so....do you want this job now? AA os.content.blackboardcdn.com Ć
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY