sweety fernandis

sweety fernandis

  • NA
  • 12
  • 5.6k

How can i compute the regular pay, overtime pay and totalpay

Sep 14 2014 9:18 AM
: : Employee name : : hourly rate of pay(decimal numbers) : : hours worked(decimal numbers) : : : : The script will display the following: : : Employee name(bold) : : regular pay(pay without overtime) : : overtime pay(time and half overtime,on hours above 40 hours) : : total pay(reg+ot in bold) : : Thanks. : : : : : : : : : : <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> : : : : : : : : : : : : : : : : Employee Pay : : : : : : : : var First, : : Last, : : name; : : // Hourly Rate, : : //Hours Worked, : : //Pay Day, : : //first, : : //second, : : //third, : : //fourth; : : : : : : Name = window.prompt("Enter your Name:"," "); : : : : : : //LastName=window.prompt("Enter Employee's Last Name:"," "); : : : : if( name == "steve") : : : : document.write("hello" + name + ""); : : : : else : : : : document.write("Hello "); : : : : hour pay=window.prompt("Enter hour pay:","0"); : : : : hourly worked=window.prompt("Enter hourly worked:","0"); : : : : document.writeln( " calculation result " ); : : : : : : if(hour worked <= 40) : : : : document.writeln("<Tr>" +hour pay +"==" + hourly worked+""); : : first=parselnt(firstName); : : second=parselnt(lastName); : : third=parselnt(hour pay); : : fourth=parselnt(hourly worked); : : : : : : document.writeln(" Employee's name"+name+" : : : : payday=firstname+lastname; : : document.writeln("" + payday+"); : : : : : : document.writeln( "");