Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Take your Winslow Sales solution and extend it to add a restriction so that the customer has to purchase in the range of 0 to
Take your Winslow Sales solution and extend it to add a restriction so that the customer has to purchase in the range of 0 to 399 Winslow Glass bottles. Make sure you change your prompt to let people know about the range restriction and put out good errors messages if they are outside of the range then ask them to "Try Again". #includeusing namespace std; int main() { int nofBottles; double totalAmount; double disCount; double disCountPer; // reading bottles cout<<"Enter total number of bottles"; cin>>nofBottles; // checking for discount percentage if(nofBottles<=10) disCountPer=0; else if(nofBottles>10 && nofBottles<=15) disCountPer=0.1; else if(nofBottles>16 && nofBottles<=20) disCountPer=0.2; else if(nofBottles>20 && nofBottles<=30) disCountPer=0.3; else disCountPer=0.35; // calculating the totalAmount totalAmount=nofBottles*24; // printing all the details cout<<"Total no of bottles : "<
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