Write a shell script to calculate gross salary, Programming Languages


 Write a shell script  (W.A.S.S) to calculate gross salary.

Program

# Write a shell script  (W.A.S.S) to calculate gross salary.


echo "Enter any Basic Salary"     #echo is a command used to print on Output device
read bs                                        #read is a command used to get input from input device
hra=`expr $bs \* 10 / 100`           # \* is used because * has special meaning
da=`expr $bs \* 15 / 100`            # expr is stands for expression
gs=`expr $bs + $da + $hra`        #calculate sum of basic,hra and da
echo "Gross salary = $gs"                # $gs prints the value stored in variable gs

Output

Gross Salary = Basic + HRA + DA. HRA = 10% and DA = 15%
Enter any Basic Salary
100
Gross salary = 125

Posted Date: 9/26/2012 4:22:26 AM | Location : United States







Related Discussions:- Write a shell script to calculate gross salary, Assignment Help, Ask Question on Write a shell script to calculate gross salary, Get Answer, Expert's Help, Write a shell script to calculate gross salary Discussions

Write discussion on Write a shell script to calculate gross salary
Your posts are moderated
Related Questions
Write a program to use a robot to move the stack of blocks from a source location to a target location, based. Movement of robot arms, picking and dropping, can be controlled usi

interference of waves

1- If the order of a (mod P) is 3, prove that the order of a+1 is 6. 2- Explain why the "simplifiled knapsack" code is not secure.

The ATM will simulate a real world automated teller machine that supports safe access to accounts from multiple concurrent clients.

WRITE A FORTRAN PROGRAMME TO GENERATE PRIME NUMBERS BETWEEN 1 AND 100.

how do I change a existing formula with a new formula and it show the result

Corrected Exercise #1: 1. Explain the following unexpected result: why did you get the system date command instead of the script? $ whereis date date: /bin/date ... $ echo $PATH

In this exercise you will develop a small 'Pop Game' in which the user will "pop" shapes that are drawn on the screen. The game will be time based, showing a shot clock at the top

Tasks: Write a Perl script assignGrades.pl to assign letter grades to the students. Please use the classList2.txt file. Upon invoking, the script will access the file classL

A hardware store sells the following hardware tools: screwdriver, wrench, and tape measure. You are asked to calculate the profit for the store based on the number of tools sold an