SHELL PROGRAM
Program to find gross salary of a employee where da=40% and hra=20% |Shell Program|
#!/bin/bash
echo "enter the basic salary:"
read basic
a=$(( $basic * 40 ))
da=$(( $a / 100 ))
b=$(( $basic * 20 ))
hra=$(( $b / 100 ))
gsalary=$(( $basic + $da + $hra ))
echo "The gross salary is : $gsalary"
OUTPUT
Enter the basic salary: 1000
The gross salary is: 1600
echo "enter the basic salary:"
read basic
a=$(( $basic * 40 ))
da=$(( $a / 100 ))
b=$(( $basic * 20 ))
hra=$(( $b / 100 ))
gsalary=$(( $basic + $da + $hra ))
echo "The gross salary is : $gsalary"
OUTPUT
Enter the basic salary: 1000
The gross salary is: 1600
Post a Comment
0 Comments