• Courses
  • Tutorials
  • DSA
  • Data Science
  • Web Tech
November 02, 2022 |750 Views

Javascript program to calculate and print bonus and gross using basic salary

  Share   Like
Description
Discussion

In this video, we will write a Javascript program to calculate bonus and gross using basic salary. 
A bonus is a financial compensation that is above and beyond the normal payment expectations of its recipient. 
Gross salary is the monthly or yearly salary of an individual before any deductions are made from it. 

Formula: 
Bonus = (Basic salary * bonus percentage)/100 
Gross salary = (Basic salary + Bonus) 

Examples
Input:
Basic salary: 25000, 
Bonus percentage: 15% 
Output: 
Bonus: 3750 
Gross Salary: 28750 

Here we assign a value to the basic salary variable and then compute the bonus amount (bonus will be calculated at 15% of basic salary) and gross salary using the given basic salary using the above-mentioned formula.