Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- setscreen ("graphics:500;400")
- colourback (100)
- cls
- var f, row, column : int
- var names : string
- var sale, totalsale : real
- row := 4
- column := 31
- totalsale := 0
- put " "
- put "Monthly Sale Report"
- put " "
- put "salesPerson Sales "
- open : f, "staff.txt", get
- loop
- row := row + 1
- exit when eof (f)
- get : f, names
- put names
- get : f, sale
- locate (row, column)
- put sale : 8 : 2
- totalsale := sale + totalsale
- end loop
- close (f)
- put "Total Sold:", totalsale : 10
- put "Average Sold:", totalsale / 5 : 8 : 2
- put ""
- put "The highest amount sold was:", sale : 8 : 2
- put "The lowest amount sold was:",
- delay (500)
- cls
Advertisement
Add Comment
Please, Sign In to add comment