Algorithm
begin
// Step 1: Input Data
print "Enter the BASIC SALARY: "
read BASIC_SALARY
print "Enter the HRA: "
read HRA
print "Enter the TA: "
read TA
print "Enter the DA: "
read DA
// Step 2: Calculate Gross Salary
GROSS_SALARY = BASIC_SALARY + HRA + TA + DA
// Step 3: Calculate Tax
TAX = 0.10 * GROSS_SALARY
// Step 4: Calculate Net Salary
NET_SALARY = GROSS_SALARY - TAX
// Step 5: Output
print "GROSS SALARY = ", GROSS_SALARY
print "TAX DEDUCTED (10%) = ", TAX
print "NET SALARY = ", NET_SALARY
end
Flowchart Description
Below is a textual representation of the flowchart that corresponds to the algorithm:
Explanation of the Flowchart:
-
Start: Indicates the beginning of the process.
-
Input Step: Represents prompts for the user to input the basic salary, HRA, TA, and DA.
-
Calculation Steps:
-
The first calculation block sums up the inputs to get the Gross Salary.
-
The next calculation block computes Tax as 10% of the gross salary.
-
Then, it calculates Net Salary by subtracting tax from the gross salary.
-
-
Output Step: Displays all the calculated values (Gross Salary, Tax, and Net Salary) to the user.
-
Stop: Marks the end of the process.