Professional Documents
Culture Documents
Pasc
Pasc
Pasc
Declare
Mem_Name, Mem_ID : Array[1..9]of string
Locate : Array,Train_ID : [1..9] of string
Mem_Code , Tol_sessions, Subtotal : Array[1..9] of integer
Dis_count, Fin_cost, Fin_costJMD : Array[1..9] of real
Andrew_total, Michelle_total, Kevin_total, :hley_total : real
Total_discount : real
Ans : char
Train_ID Array[1..9] : string
y : integer
Mem_fee : real
Train_Fname : string
Usage_fee : real
GCT : real
Begin
Total_discount = 0.0
Andrew_total = 0.0
Michelle_total = 0.0
Kevin_total = 0.0
:hley_total = 0.0
Y=0
For x = 1 to 9 DO
Begin
Subtotal [y] = 0
Dis_count[y] = 0.0
Fin_cost[y] = 0.0
Fin_costJMD [y] = 0.0
End for
End if
End if
End if
End if
End if
End if
Usage_ fee = tol_sessions [y] * 4.75
Subtotal [x] = Mem_fee + Usage_fee
If(Mem_Code[y]’STU’ AND tol_sessions[y] > 12 then
Dis_count[y]= subtotal [y] * 0.05
Else
If(Mem_Code[y] ‘PRV’ tol_sessions[y] > 20 then
Dis_count[y]= Mem_fee * 0.03
Else
Dis_count[y] = 0.0
End if
End if
ENDWHILE
Writeln( ‘Name: | ID | Location | Sessions | Subtotal | Discount | Final Cost | Fnal Cost JMD’
For y = 1 to 9 DO
Begin
Writeln( Mem_Name[y] ,Mem_ID[y],
Writeln( ‘Membership Code:’, Mem_Code[y]
Writeln( ‘Location:’,Locate[y]
Writeln( ‘Total Sessions:’,Tol_ sessions[y]
Writeln( ‘Subtotal:’,Subtotal[y]
Writeln( ‘Discount:’,Dis_count[y]
Writeln( ‘Final Cost:’,Fin_cost[y]
Writeln( ‘Final Cost JMD:’,Fin_costJMD[y]
End for
Writeln( ‘SUMMARY’
Writeln( ‘Total Discount:’,Total_discount
Writeln( ‘Andrew Forrester:’, Andrew_total
Writeln( ‘Michelle Palmer:’, Michelle_total
Writeln( ‘Kevin Roberts:’, Kevin_total =
Writeln( ‘:hley Fowler:’, :hley_total
END
While Loop