FortNiteGodLite

Untitled

Jan 10th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. setscreen ("graphics:500;400")
  2. colourback (100)
  3. cls
  4.  
  5. var f, row, column : int
  6. var names : string
  7. var sale, totalsale : real
  8. row := 4
  9. column := 31
  10. totalsale := 0
  11. put " "
  12. put "Monthly Sale Report"
  13. put " "
  14. put "salesPerson Sales "
  15. open : f, "staff.txt", get
  16. loop
  17. row := row + 1
  18. exit when eof (f)
  19. get : f, names
  20. put names
  21. get : f, sale
  22. locate (row, column)
  23. put sale : 8 : 2
  24. totalsale := sale + totalsale
  25. end loop
  26. close (f)
  27. put "Total Sold:", totalsale : 10
  28. put "Average Sold:", totalsale / 5 : 8 : 2
  29. put ""
  30. put "The highest amount sold was:", sale : 8 : 2
  31. put "The lowest amount sold was:",
  32. delay (500)
  33. cls
Advertisement
Add Comment
Please, Sign In to add comment