Measure Total Expenses | Sololearn: Learn to code for FREE!

0

Measure Total Expenses

While purchasing an item, discount of 10% is offered if the purchasing amount is more than 1000. If quantity and price per item are input through keyboard, write a program to calculate total expenses in c program

c

4/28/2018 2:51:54 PM

Jordan

1 Answer

New Answer

+1

return (n > 1000) ? n * 0.9 : n;