11. When you ______ this paragraph, make it a bit shorter (WRITE)
Answers
Answer:
your answer is the same as in bracket =
"WRITE" is the answer
Answer:
#include<iostream>
#include<iomanip>
using namespace std;
int main(){
int quantity, discount;
cout<<"Number of units sold: ";
while(1){
cin>>quantity;
if(quantity>=0)
break;
cout<<"Quantity Can't be negative. Reenter: "<<endl;
}
if(quantity>=10 && quantity<=19)
discount = 20;
else if(quantity>=20 && quantity<=49)
discount = 30;
else if(quantity>=50 && quantity<=99)
discount = 40;
else if(quantity>=100)
discount = 50;
cout<<setprecision(2)<<fixed;
double discount_price = (quantity*99)*(discount/100.0);
cout<<"Regular Price: $"<<(quantity*99)<<endl;
cout<<"Discount: "<<discount<<"%"<<endl;
cout<<"Discounted Price: $"<<discount_price<<endl;
cout<<"Total Cost of Purchase: $"<<((quantity*99)-discount_price)<<endl;
return 0;
}