Computer Science, asked by biswassagnik73, 1 year ago

Javascript:

Enter Salary of an employee along with his name, calculate net salary after deducting 10% gst

Answers

Answered by Honey6768
0
I have written the program using scanner class

hope it helps if so please mark it as brainliest
Attachments:

biswassagnik73: Thanks! Let another person answer and i will make your answers "The Brainliest"
Honey6768: why to wait please mark it
Honey6768: if you want to check it then compile it in your computer or laptop
biswassagnik73: arrey if another person dont give an answer i cant make yu brainliest as it is the rule of the site. i will mark you but a second question has to be completed so that this section closes!
Answered by Anonymous
1

Hi

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<title>Net Salary Calculator</title>

</head>

<body>

<script>

 function salarycaluclator () {

  // Get the salary from user

  let salary = parseInt(prompt('Please enter employee salary'));

  // Get the employee name from user

  let employeeName = prompt('Please enter employee name');

  // Calculate Net salary

  let netSalary = salary - ((salary /100) * 10);

  // write the ouput in document

  document.write(`Net salary of ${employeeName} is ${netSalary}`);

 }

 // Call the function to begin program

 salarycaluclator();

</script>

</body>

</html>

Attachments:
Similar questions