Logo 
Search:

Unix / Linux / Ubuntu Articles

Submit Article
Home » Articles » Unix / Linux / Ubuntu » Homework HelpRSS Feeds

Program to calculate the gross salary

Posted By: Idelia Miller     Category: Unix / Linux / Ubuntu     Views: 37222

The person’s basic salary is input through the keyboard. His dearness allowance is 40% of #the basic salary, and house rent allowance is 20% of the basic salary. Write a program to #calculate the gross salary.

Code for Program to calculate the gross salary in Unix / Linux / Ubuntu

echo "Enter basic salary : "
read salary

grossal=`echo $salary + $salary \* 40 /100 | bc`
grossal=`echo $grossal + $salary \* 20 / 100 | bc`

echo "Gross salary is : $grossal"
  
Share: 


Didn't find what you were looking for? Find more on Program to calculate the gross salary Or get search suggestion and latest updates.

Idelia Miller
Idelia Miller author of Program to calculate the gross salary is from Frankfurt, Germany.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!