Answered step by step
Verified Expert Solution
Link Copied!

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". #include  using 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Systems

Authors: Sham Navathe,Ramez Elmasri

5th Edition

B01FGJTE0Q, 978-0805317558

More Books

Students also viewed these Databases questions