Professional Documents
Culture Documents
41.
Step 1: Start
Step 2: Input Basic, HRA, TA, DA
Step 3: Set Gross_salary = Basic + HRA + TA+ DA
Step 4: Set tax = 0.10 * Gross_salary
Step 5: Set salary = Gross_salary – tax
Step 6: Print salary
Step 7: End
42.
a) and b) are too general. Try it yourself.
c)
Step 1: Read number of items as n
Step 2: Set I = 0
Step 3: Set total = 0
Step 4: Repeat step 5 – 9 while I <n
Step 5: Read quantity as q and price as p
Step 6: Set item_price = q * p
Step 7: Set price = price + item_price
Step 8: Set I = I + 1
Step 9: Print price
Step 10: End
d)
h)
Step 1: Set I = 0
Step 2: Set sum = 0
Step 3: Repeat Steps 4 - 6 while I < 10
Step 5: Set sum = sum + i
Step 6: Set I = I + 1
Step 7: Print sum
Step 8: End