obtain sales amount if amount is > 5000 then I give a discount of 10% otherwise give discount as 0% calculate amount payable.
a)draw a flowchart for above problem. b)Write an algorithm for above problem.
Answers
Answered by
23
Get two inputs quantity and price from user using scanf statement
Calculate amount by using the expression amount = quantity * price
Check whether amount is greater than 5000 using if statement.
if amount is greater than 5000 then calculate discount and amount using the expressions discount = amount * 0.05 and amount = amount - discount.
print amount using printf statement.
Answered by
34
Explanation:
hope this is useful.
comp class 8
must b
Attachments:
Similar questions