STARBUCKS COFFEE offers a loyalty rewards program for customers with two levels: Green and Gold. It decides to give discounts on beans' bags based on customer level and the number of bought bags as shown in the table below: Level Number of bags 25 bags 2 10 bags 25 bags Discount 5% of total price 10% of total price 15% of total price 20% of total price Green (R) Gold (G) 2 10 bags Knowing that each bag of beans cost 45 SR, write a program that reads customer loyality level: R for Green or G for Gold, and the number of bags to buy. Your program should then caleulate and print the total cost of the order as shown in the sample run Note: • Use awitch with the input level. Your program should accept both uppercase and lowercase for the input level. ĮSample Run #1] Enter your loyality level (R for Green) or (G for Gold): R Enter the number of beans bags: 7 ****STARBUCKS*** Number of bags ordered: 7| 315 SR Discount: -15.75 Your total charge is 299.25 SR ISample Run #2] Enter your loyality level (R for Green) or (G for Gold): Enter the number of beans bags: ****STARBUCKS** Number of bags ordered: 4| 180 SR Discount: -0 Your total charge is 180 SR
STARBUCKS COFFEE offers a loyalty rewards program for customers with two levels: Green and Gold. It decides to give discounts on beans' bags based on customer level and the number of bought bags as shown in the table below: Level Number of bags 25 bags 2 10 bags 25 bags Discount 5% of total price 10% of total price 15% of total price 20% of total price Green (R) Gold (G) 2 10 bags Knowing that each bag of beans cost 45 SR, write a program that reads customer loyality level: R for Green or G for Gold, and the number of bags to buy. Your program should then caleulate and print the total cost of the order as shown in the sample run Note: • Use awitch with the input level. Your program should accept both uppercase and lowercase for the input level. ĮSample Run #1] Enter your loyality level (R for Green) or (G for Gold): R Enter the number of beans bags: 7 ****STARBUCKS*** Number of bags ordered: 7| 315 SR Discount: -15.75 Your total charge is 299.25 SR ISample Run #2] Enter your loyality level (R for Green) or (G for Gold): Enter the number of beans bags: ****STARBUCKS** Number of bags ordered: 4| 180 SR Discount: -0 Your total charge is 180 SR
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...
Related questions
Question
i need the answer quickly
![STARBUCKS COFFEE offers a loyalty rewards program for customers with two
levels: Green and Gold. It decides to give discounts on beans' bags based on customer
level and the number of bought bags as shown in the table below:
Level
Number of bags
Discount
25 bags
2 10 bags
2 5 bags
2 10 bags
5% of total price
Green (R)
10% of total price
15% of total price
20% of total price
Gold (G)
Knowing that each bag of beans cost 45 SR. write a program that reads customer
loyality level: R for Green or G for Gold, and the number of bags to buy. Your program
should then caleulate and print the total cost of the order as shown in the sample run
Note:
Use gwitch with the input level.
• Your program should accept both uppercase and lowercase for the input level.
[Sample Run #1]
Enter your loyality level (R for Green) or (G for Gold): R
Enter the number of beans bags: 7
****STARBUCKS****
Number of bags ordered: 7| 315 SR
Discount: -15.75
Your total charge is 299.25 SR
[Sample Run #2]
Enter your loyality level (R for Green) or (G for Gold):
Enter the number of beans bags: 4
****STARBUCKS****
Number of bags ordered: 4 | 180 SR
Discount: -0
Your total charge is 180 SR](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F8fc4c6ae-98ad-427e-a285-eb5a4bfdf59b%2F73542209-085d-486e-bf81-2469f56a3e9d%2Fn3kwhg_processed.jpeg&w=3840&q=75)
Transcribed Image Text:STARBUCKS COFFEE offers a loyalty rewards program for customers with two
levels: Green and Gold. It decides to give discounts on beans' bags based on customer
level and the number of bought bags as shown in the table below:
Level
Number of bags
Discount
25 bags
2 10 bags
2 5 bags
2 10 bags
5% of total price
Green (R)
10% of total price
15% of total price
20% of total price
Gold (G)
Knowing that each bag of beans cost 45 SR. write a program that reads customer
loyality level: R for Green or G for Gold, and the number of bags to buy. Your program
should then caleulate and print the total cost of the order as shown in the sample run
Note:
Use gwitch with the input level.
• Your program should accept both uppercase and lowercase for the input level.
[Sample Run #1]
Enter your loyality level (R for Green) or (G for Gold): R
Enter the number of beans bags: 7
****STARBUCKS****
Number of bags ordered: 7| 315 SR
Discount: -15.75
Your total charge is 299.25 SR
[Sample Run #2]
Enter your loyality level (R for Green) or (G for Gold):
Enter the number of beans bags: 4
****STARBUCKS****
Number of bags ordered: 4 | 180 SR
Discount: -0
Your total charge is 180 SR
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 2 images

Recommended textbooks for you

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 Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

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 Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

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
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education

Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY