# compute the daily wage of an employee.

melissa so
compute the daily wage of an employee.
3 Answer(s)      6 years and 9 months ago
Posted in : HTML

B. Write a JavaScript program that would input Employee Name, Rate per hour, No. of hours worked and will compute the daily wage of an employee. If the number of hours worked exceeds eight hours add 30% to each excess hours as overtime rate. Formula: Daily Wage = Rate per hour * No. of hours worked + OT pay

December 2, 2010 at 5:38 PM

B. Write a JavaScript program that would input Employee Name, Rate per hour, No. of hours worked and will compute the daily wage of an employee. If the number of hours worked exceeds eight hours add 30% to each excess hours as overtime rate. Formula: Daily Wage = Rate per hour * No. of hours worked + OT pay

December 2, 2010 at 5:38 PM

December 2, 2010 at 5:42 PM

hi Friend,

Try the following code:

```<html>
<script>
function calculate(){
var name=document.form.name.value;
var ratePerHour=document.form.rate.value;
var thours=document.form.hour.value;
var wages;
var increasedWage;
var gp;
if(thours>8){
var wage=8*ratePerHour;
var wg=wage*0.30;
var hr=thours-8;
increasedWage=wg*hr;
wages=wage+increasedWage;
}
else{
wages=thours*ratePerHour;
increasedWage=0;
}
document.writeln("Employee Name: "+name+"<br>");
document.writeln("Rate Per Hour: "+ratePerHour+"<br>");
document.writeln("No. of hours: "+thours+"<br>");
document.writeln("Overtime pay: "+increasedWage+"<br>");
document.writeln("Gross pay: "+wages+"<br>");

}
</script>
<form name="form">
<table>
<tr><td>Employee Name:</td><td><input type="text" name="name"></td></tr>
<tr><td>Rate Per Hour:</td><td><input type="text" name="rate"></td></tr>
<tr><td>Number of Hours:</td><td><input type="text" name="hour"></td></tr>
<tr><td></td><td><input type="button" value="Calcuate" onclick="calculate();"></td></tr>
</table>
</form>
</html>
```

Thanks

Related Tutorials/Questions & Answers:
compute the daily wage of an employee.
compute the daily wage of an employee.   B. Write a JavaScript... and will compute the daily wage of an employee. If the number of hours worked exceeds eight hours add 30% to each excess hours as overtime rate. Formula: Daily Wage
compute the daily wage of an employee.
compute the daily wage of an employee.   B. Write a JavaScript... and will compute the daily wage of an employee. If the number of hours worked exceeds... and will compute the daily wage of an employee. If the number of hours worked
compute
compute  B. Write a JavaScript program that would input Employee Name, Rate per hour, No. of hours worked and will compute the daily wage... hours as overtime rate. Formula: Daily Wage = Rate per hour * No. of hours
compute
Name, Rate per hour, No. of hours worked and will compute the daily wage... Name, Rate per hour, No. of hours worked and will compute the daily wage... hours as overtime rate. Formula: Daily Wage = Rate per hour * No. of hours
compute
compute    Write a menu driven program that will print out the results of the following : (1) Ceiling (2) Floor (3) Absolute (4) (a+b)^3 (5) Exit... at 25% Input the name and marks of 25 students and compute the average. Print out
Compute command
Compute command  hello, What is compute command?   hii, samar Compute command control computations on subsets created by the BREAK command
compute the average of degrees
compute the average of degrees  using c++ language , write a program to do the following 1 enter three degrees of a student by the user . 2 compute the average of his degrees
Adding an employee  coding for adding an employee
Add Employee  coding for adding an employee
Employee Salaries
Employee Salaries  Define a class Employee with the following properties. Every Employee has a name and a salary. The constructor creates an Employee... the salary of the Employee to zero. The method getinfo() will return the current
EMPLOYEE - SQL
EMPLOYEE  CALCULATE EMPLOYEE SALARY  Hi friend, Please give the full details of Problem. Thanks
Employee form
Employee form  In employee form emp Id id after any data iserted is incremented for oher data insertion. insert, delete, update buttons when we cleak the select buttoun then the created table data iserted automaticaly
compute the final grades
compute the final grades  C. Write a JavaScript program that would input a student?s final grade from 50-100. Evaluate the Final grade and display the Point Equivalent based on the table below. Indicate also the remarks
compute the final grades
compute the final grades  C. Write a JavaScript program that would input a student?s final grade from 50-100. Evaluate the Final grade and display the Point Equivalent based on the table below. Indicate also the remarks
compute the final grades
compute the final grades  C. Write a JavaScript program that would input a student?s final grade from 50-100. Evaluate the Final grade and display the Point Equivalent based on the table below. Indicate also the remarks
compute the final grades
compute the final grades  C. Write a JavaScript program that would input a student?s final grade from 50-100. Evaluate the Final grade and display the Point Equivalent based on the table below. Indicate also the remarks
compute the final grades
compute the final grades  C. Write a JavaScript program that would input a student?s final grade from 50-100. Evaluate the Final grade and display the Point Equivalent based on the table below. Indicate also the remarks
employee records
employee records  Pl give one script like i will creat one table name Emp_master and column name like Empcode, Empname. I like one form where I... and one report like details of employee thanks
Employee Salaries
Employee Salaries  Define a class Employee with the following properties. Every Employee has a name and a salary. The constructor creates an Employee... the salary of the Employee to zero. The method getinfo() will return the current
Employee Salaries
Employee Salaries  Define a class Employee with the following properties. Every Employee has a name and a salary. The constructor creates an Employee... the salary of the Employee to zero. The method getinfo() will return the current
employee records
employee records  Pl give one script like i will creat one table name Emp_master and column name like Empcode, Empname. I like one form where I... and one report like details of employee thanks
employee records
employee records  Pl give one script like i will creat one table name Emp_master and column name like Empcode, Empname. I like one form where I... and one report like details of employee thanks
Employee Salaries
Employee Salaries  Define a class Employee with the following properties. Every Employee has a name and a salary. The constructor creates an Employee... the salary of the Employee to zero. The method getinfo() will return the current
Employee Salaries
Employee Salaries  Define a class Employee with the following properties. Every Employee has a name and a salary. The constructor creates an Employee... the salary of the Employee to zero. The method getinfo() will return the current
Employee Salaries
Employee Salaries  Define a class Employee with the following properties. Every Employee has a name and a salary. The constructor creates an Employee... the salary of the Employee to zero. The method getinfo() will return the current
compute the final grades
compute the final grades  C. Write a JavaScript program that would input a student?s final grade from 50-100. Evaluate the Final grade and display the Point Equivalent based on the table below. Indicate also the remarks
application for an Employee
: in this page it should modify employee data and persist in DB 3.DISPLAY
employee progarm
employee progarm  Hai, I have developed a code for an employee program by using jtext fields and buttons,it has no errors but while we are compiling it it is saying that "Exception in thread "main
coding for employee management system
coding for employee management system  coding for employee management system
Employee Management System
Employee Management System  coding for employee management system
Employee Management System
Employee Management System  coding for employee management system