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
Why is this correct/when is this the right idea

Define Call by value - Computer Programming? Functions are raise by writing their name and an appropriate list of arguments within parenthesis. Usually these arguments are in t

A traveler wants to purchase a number of traveler''s checks, each having a set amount for four different currencies: Mexican pesos, Euro dollars, Swiss francs, and US dollars. A t

How to read datasets in multiple text files in an non interactive program?

You need to create a Fraction calculator program.You need to create a Fraction class to represent fraction objects and a FractionCalculator class that will perform operations on fr

Improved Application Deployment Data source implementation is perhaps the key to any Asp.net program implementation, and, if the database implementation is easily done, there is an

Write a Fortran LOGICAL FUNCTION, called "is_prime", which determines if a given integer value is a prime number or not (A prime number is a natural number which has only two disti

i need a coding to glow 8 LEDs on a port with pwm effect

What are the main pros and cons of assembly programming language?

You are to build a Schema in XML Schema Language that will be used to support the development of the new central course information management system and other supporting applicati