Guest User

Untitled

a guest
Jan 15th, 2018
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
QBasic 0.75 KB | None | 0 0
  1. CLS
  2. PRINT "This program is designed to take the details of six employees and"
  3. PRINT "calculate their gross and net pay, at a rate of 5 euro per hour."
  4. PRINT
  5. DIM a$(6)
  6. DIM b(6)
  7. FOR i = 1 TO 6
  8. PRINT "Insert the employee's name."
  9. INPUT a$(i)
  10. PRINT "Insert the hours worked by "; a$(i)
  11. INPUT b(i)
  12. LET gross = b(i) * 5
  13. LET c(i) = gross * .8
  14. PRINT
  15. PRINT TAB(5); "Employee Number:"; i
  16. PRINT TAB(5); "Employee: "; a$(i)
  17. PRINT TAB(5); "Hours Worked:"; b(i)
  18. PRINT TAB(5); "Gross Pay :"; gross
  19. PRINT
  20. PRINT "---------------------------------------------------------------------"
  21. NEXT i
  22. PRINT "[Overall Information]"
  23. PRINT TAB(5); "Employee"; TAB(10); "Hours Worked"; TAB(10); "Net Pay"
  24. FOR i = 1 TO 5
  25. PRINT TAB(5); a$(i); TAB(10); b(i); TAB(10); c(i)
  26. NEXT i
Add Comment
Please, Sign In to add comment