Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var fileno, invoice, tickets : int
- var events, person : string
- var total, price, total2, service, servicetot : real
- service := 1.50
- View.Set ("graphics:1024,768")
- open : fileno, "events.txt", get
- get : fileno, person
- get : fileno, invoice
- put "Customer: ", person
- put "Customer Number: ", invoice
- %Bottom
- put " "
- put " "
- put "Event" : 50, "Price" : 10, "Nr. of Tickets" : 20, "Event Total"
- put " "
- total2 := 0
- servicetot := 0
- loop
- exit when eof (fileno)
- get : fileno, events : *
- get : fileno, price
- get : fileno, tickets
- total := (price * tickets) + service * tickets
- total2 := total2 + total
- servicetot := servicetot + (service * tickets)
- put events : 50, price : 5, tickets : 12, total : 18 : 2
- end loop
- put ""
- put " " : 28, "Total of all events" : 50, " ", total2 : 3 : 2
- put " " : 28, "Service Charge" : 52, servicetot : 3 : 2
- put " " : 28, "Final Total" : 51, total2 + servicetot : 3 : 2
- close (fileno)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement