Please help me with this | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
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

14th Aug 2022, 7:21 AM
Dotse Jerry Kwesi
5 Answers
+ 1
Hi! Please, show us your attempt!
14th Aug 2022, 8:17 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 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!
14th Aug 2022, 8:44 AM
Lisa
Lisa - avatar
+ 1
kwesi HotTea totalAmount = totalAmount - discount;
14th Aug 2022, 9:38 AM
A͢J
A͢J - avatar
0
Okay cool
14th Aug 2022, 8:45 AM
Dotse Jerry Kwesi
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; }
14th Aug 2022, 8:58 AM
Dotse Jerry Kwesi