-----------------------------Script--------------------------- echo "Enter the basic salary : " read salary dearness=`echo "$salary * 0.40" | bc` hrent=`echo "$salary * 0.20" | bc` salary=`echo "$salary + $dearness + $hrent" | bc` echo "Dearness Allowance = $dearness " echo "House Rent = $hrent" echo "Gross Salary = $salary" -----------------------------output--------------------------- Enter the basic salary : 10000 Dearness Allowance = 4000.00 House Rent = 2000.00 Gross Salary = 16000.00 -----------------------------END------------------------------
Home
Shell Script
Basic salary of a person is input through the keyboard. His dearness allowance is 40% of basic salary and house rent in 20% of basic salary. Write a program to calculate the gross pay.
- Blogger Comment
- Facebook Comment
Subscribe to:
Post Comments
(
Atom
)
0 comments:
Post a Comment