Calculate the gross salary using shell script coderinme

Calculate the gross salary using shell script

Write a shell script for finding Gross Salary of Ramesh if DA and
HRA is 40% and 20%

#!/bin/bash
(bash copy)
read -p "Enter salary: " sal
gros_sal=`echo "$sal*0.40+$sal*0.20" | bc -l`
echo "Gross Salary is: $gros_sal"

Leave a reply:

Your email address will not be published.