
Decision Statements 89
printf ("\rtTotal Sales : %.2f”,sale);
printf ("\tiBasic Salary: %.2f',bs);
printf ("\nHra : %.2f',hra);
printf ("\nDa : %.2f',da);
printf ("\nConveyance : %.2f',cv);
printf ("\nlncentive : %.2f',incentive);
printf ("\nBonus ; %.2f'/bonus);
printf ("\nGross Salary : %.2f',ts);
getchO;
i
OUTPUT : Enter Total Sales in Rs.: 100000
Total Sales
Basic Salary
Hra
Da
Conveyance
Incentive
Bonus
Gross Salary
100000.00
3000.00
600.00
3300.00
500.00
10000.00
500.00
17900.00
Explanation This program calculates the salary of a medical representative depending on sales.
H>e Basic salary is same but other allowances and in