Please help me with this | Sololearn: Learn to code for FREE!

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

c++

8/14/2022 7:21:09 AM

Dotse Jerry Kwesi

8 Answers

New Answer

+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

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; }