0
Please help me with this
A shop will give discount of 10% if the cost of purchase quantity is more than 1000. Ask user for quantity Suppose, one unit will cost 100. Judge and print cost for user
8 Answers
+ 1
Hi! Please, show us your attempt!
+ 1
If it is a sololearn task, please mention task number.
Read the lesson again, try to write thw code, them show us the code so we can check on it!
+ 1
kwesi HotTea
totalAmount = totalAmount - discount;
0
Okay cool
0
Using namespace std;
int main () {
float discount, totalAmount, totalQuantity;
int unit = 100;
cout <<âenter your quantity=â;
cin >> totalQuantity;
totalAmount=totalQuantity * unit;
if(totalQuantity > 1000){
discount = totalAmount * 10/100;
cout << âyour discount is : â<< discount << endl;
totalAmount = totalQuantity _discount;
cout <<âyour total cost :â<< totalAmount <<endl;
} else{
cout <<âthereâs no discountâ;
}
return 0;
}