can anybody help me point out whats missing on my program.. TIA | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

can anybody help me point out whats missing on my program.. TIA

These are the given: The supermarket is giving 10 % discount on all items. Design a program to input amount of purchase and amount of money paid by the customer. The program calculates the the 10% discount, net purchase and the amount of change. Pls include in your program proper statements to prompt the user what to do and explanatory text regarding the data you are displaying. https://code.sololearn.com/cKYnG4aT3DYP/?ref=app https://code.sololearn.com/cKYnG4aT3DYP/?ref=app

8th Dec 2020, 10:37 AM
christian malatamban
christian malatamban - avatar
2 Answers
+ 1
Here in SoloLearn user defined packages don't work..
8th Dec 2020, 2:19 PM
Jayakrishna 🇮🇳
0
What you are trying to do is not clear. Seems you are trying to calculate net income or something like that for 10% of total :) Its straight forward just do something like amount * (10/100); What you did is you used .(dot) before '*' sign so compiler trying to find data member of class. Its simple syntax error so first learn how to perform arithmetic operation properly before trying to do something :) Good luck!, just play with your code you will learn it:
8th Dec 2020, 2:18 PM
Kuber Acharya
Kuber Acharya - avatar