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
Who can help with MATLAB?

Simple Shell In this LAB, you will explore and extend a simple Unix shell interpreter. In doing so, you will learn the basics of system calls for creating and managing process

Assignment for Networing&camunication

create a small database for a company, require at least 4 tables. also, have 4 business report, oracle built-in function, 5 string, 5 number or math functions, 5 date and time func

What is an algorithm? What are the characteristics of a good algorithm? An algorithm is defined as “a step-by-step procedure of accomplishing some task'''' An algorithm may be sh

**This programming assignment is for use in the LINUX/UNIX environment!! Introduction: System administration often requires custom written programs and tools. One problem a syste

can you provide some assignments for JSP learning

Software and sales assingment I keep get a syntax error

Question: (a) What do you understand by the term Postback? (b) Describe five benefits of creating virtual directories while developing an ASP.NET application. (c) Exp

Create the class Robot described in the Karel++ book. Description: The Robot class described in the Karel++ text is a derived class of ur_Robot. Create class Robot as a d