/ Published in: ASP
URL: http://reusablecode.blogspot.com/2010/09/calculating-annual-salary-for-employees.html
Requires my WorkingDays function.
Expand |
Embed | Plain Text
<% ' Copyright (c) 2010, reusablecode.blogspot.com; some rights reserved. ' ' This work is licensed under the Creative Commons Attribution License. To view ' a copy of this license, visit http://creativecommons.org/licenses/by/3.0/ or ' send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California ' 94305, USA. function annualSalary(someYear, hourlyPay) const hoursPerDay = 8 annualSalary = 0 for i = 1 to 12 annualSalary = annualSalary + WorkingDays(someYear, i) * hoursPerDay * hourlyPay next end function function monthlySalary(someYear, someMonth, hourlyPay) const hoursPerDay = 8 monthlySalary = 0 monthlySalary = monthlySalary + WorkingDays(someYear, someMonth) * hoursPerDay * hourlyPay end function %>
You need to login to post a comment.
