Announcement

Collapse

Forum Guidelines

This forum is for finished source code that is working properly. If you have questions about this or any other source code, please post it in one of the Discussion Forums, not here.
See more
See less

Conversion Code

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Conversion Code

    Hope you guys don't mind me sharing some PB/DOS code with you. Had to prove a point to my boss recently and decided to use PB/DOS to do it with the following code:

    Code:
    ' Salary->Hourly Wage Calculator 
    ' Programming by Robert Wolfe <BBS: net261.ath.cx | Fido 1:261/20> 
    ' With "on-call" adaptation as outlined by Hunter Wolfe 
    ' Version 1.00 
     
    '--------------------------------------------------------------------- 
    '  Program Constants 
    '--------------------------------------------------------------------- 
    YrWks = 52        ' Total number of weeks in a year 
    WkHrs = 40        ' Total number of hours for full-time position 
    YrHrs = YrWks * WkHrs    ' Total number of hours in a year for full time 
    DyCal = 16        ' Number of on-call hours in a day 
    WkCal = 112        ' Number of on-call hours in a week 
     
    '--------------------------------------------------------------------- 
    '  Get necessary data from the user 
    '--------------------------------------------------------------------- 
    Print 
    Input "How many people on call (weekly rotation)"; OnCall 
    Input "What is your gross yearly pay (pay before taxes)"; YrlySal 
     
    TtlOCW = YrWks / OnCall    ' Total number of on-call weeks per year 
    Print "Total On-Call Weeks Per Year:"; TtlOCW 
     
    TtlOCH = TtlOCW * WkCal    ' Total number of hours on call per year 
    Print "Total On-Call Hours Per Year:"; TtlOCH 
     
    TtlHPY = TtlOCH + YrHrs ' Total hours per year worked overall 
    Print "Total Hours Worked Per Year Overall:"; TtlHPY 
     
    Hourly = YrlySal / TtlHPY ' Gross salary 
    Print "Your actual gross wages per hour are: $"; Hourly
Working...
X