Using Switch and Looping...Problem Statement : A localschool needs a program wri
ID: 3609892 • Letter: U
Question
Using Switch and Looping...Problem Statement : A localschool needs a program written to compute funds raised based onsales of various types of $10.00 gift cards. Students have a choiceof which type of gift card they want to sell: Starbucks, JambaJuice or Cold Stone. Each gift card carries with it a differentcontribution amount from the company to the fund raiser event. Inthe table below, please note how much each company contributes towards the fund raising based on sales of their giftcard. Category Type of Gift Card Fund Raising Contribution "S" or "s" Sturbucks 50% "J" or "j" Jamba Juice 30% "C" or "c" Cold Stone 25%Write a program that: Asks the user for the student ID (a 4-digit numericidentification number), the type of gift card the student chose tosell ("S", "s", "J", "j", "C", "c") and how many of that giftcard the student sold. Computes and prints the amount of funds raised by thestudent. Keeps a running total of the number of gift cards sold foreach company. Keeps a running total of the funds raised from sales for typeof gift card. Keeps a running total of the overall number of gift cardssold. Keeps a running total of the overall amount of fundsraised. Outputs the running totals as at the end of run as shown onthe back of this page
****************Your Name Fund RaiserCalculator********************* Do you have data to enter regarding students sales? (1=yes,0=no)
Please enter the Student ID: 1111 Please enter the type of gift card sold (S=Starbucks, J=jamba Juice, C=Cold Stone): S Please enter the number of cards sold:
The funds raised by Student 1111 is:
Do you have more data to enter"(1=yes, 0=no)? 1
Category Type of Gift Card Fund Raising Contribution "S" or "s" Sturbucks 50% "J" or "j" Jamba Juice 30% "C" or "c" Cold Stone 25%
Write a program that: Asks the user for the student ID (a 4-digit numericidentification number), the type of gift card the student chose tosell ("S", "s", "J", "j", "C", "c") and how many of that giftcard the student sold. Computes and prints the amount of funds raised by thestudent. Keeps a running total of the number of gift cards sold foreach company. Keeps a running total of the funds raised from sales for typeof gift card. Keeps a running total of the overall number of gift cardssold. Keeps a running total of the overall amount of fundsraised. Outputs the running totals as at the end of run as shown onthe back of this page
****************Your Name Fund RaiserCalculator********************* Do you have data to enter regarding students sales? (1=yes,0=no)
Please enter the Student ID: 1111 Please enter the type of gift card sold (S=Starbucks, J=jamba Juice, C=Cold Stone): S Please enter the number of cards sold:
The funds raised by Student 1111 is:
Do you have more data to enter"(1=yes, 0=no)? 1
Explanation / Answer
#include #include using namespace std; int main(){ int value = 10; double starbucks_share = 0.5; double JambaJuice_share = 0.3; double ColdStone_share = 0.25; int starbucks_total =0; int JambaJuice_total =0; int ColdStone_total =0; double starbucks_sales =0; double JambaJuice_sales =0; double ColdStone_sales =0; //float totalsales = 0.0; int loop = 0; coutloop; while(loop != 0){ int id; char type; int number; coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.