Write a shell script to calculate gross salary, Programming Languages

Assignment Help:


 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


Related Discussions:- Write a shell script to calculate gross salary

Built a liner program to manage a staff, A manager at the local Walmart nee...

A manager at the local Walmart needs to determine how many workers to hire to cover a 24-hour period. Each worker must work 9 consecutive hours but may only start work at the begin

Secure programming environments, 1. A readme.txt file with: a. Instructi...

1. A readme.txt file with: a. Instructions on how to compile and run your client and server code on the command line. (Also provide shell scripts if the commands are complicated

Difference between MOV and MOVS, 2. TEST & AND TEST is like CMP, it is used...

2. TEST & AND TEST is like CMP, it is used for conditional statement, and doesn’t save the answer. AND is logical multiplication. 3. INS & IN IN is used for data transfer from I/O

Program to find the largest value in an array, 1. Write out a detailed plan...

1. Write out a detailed plan for a program to find the largest value in an array that is smaller than a ceiling C. For example, suppose the array has the values {4, 14, 11, 100, 6}

Calculate the total price to purchase all the components req, Calculate the...

Calculate the total price to purchase all the components required to build a state-of-the-art gaming computer from components available on the internet. Before attempting this exer

Need help starting a project out, I''m doing a project for class in college...

I''m doing a project for class in college and im supposed to use today''s date and figure out how old i am in months, days, minutes, and seconds. My question is what is the beset

Write a program to draw the fish, Write a program to draw the figure shown ...

Write a program to draw the figure shown below. the program must provide: a. Close the fish's mouth slowly (at least 5 moves from the original position to close the mouth) b.

Sytem call, use of exec and nice system call

use of exec and nice system call

Matrix, Write a function named prob2.m which creates and returns an N×N ide...

Write a function named prob2.m which creates and returns an N×N identity matrix. An identity matrix is a square matrix with values of one on the main diagonal and zeros in all off-

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd