Professional Documents
Culture Documents
Psuedocode
Psuedocode
Psuedocode
25 members. Based on the information inputted, this algorithm will then calculate the amount
due, amount outstanding, fine amount, the overall total paid by all 25 members, maximum
outstanding amount, total number of people with outstanding amount and average fines.
--Declaration of constants
CONST
Fpercent = 0.045
Noofmonths = 12
Monthlyrate1 = 50.00
Monthlyrate2 = 100.00
Monthlyrate3 = 150.00
Monthlyrate4 = 200.00
--Declaration of variables
DECLARE
Ftname, Ltname, Category AS STRING
Amtdue, Amtoutd, Amtpaid, Feamount, Ovtotal, Max_amtoutd, Tfamt, Avfine AS REAL
Tno_outppl, Count AS INTEGER
START
FOR Count = 1 TO 25 DO
PRINT "Please enter first name"
READ Ftname
PRINT "Please enter last name"
READ Ltname
PRINT "Please enter category"
READ Category
PRINT "Please enter amount paid"
READ Amtpaid
--Calculating amount due based on member’s category rate
IF (Category = 'ST') THEN
Amtdue = Noofmonths * Monthlyrate1
ELSEIF
Amtdue = Noofmonths * Monthlyrate4
ENDIF
--Calculating amount outstanding based on the amount due and amount paid by the member
Amtoutd = Amtdue - Amtpaid
--Calculating the fine amount and total fine amount based on the amount outstanding by the member
IF (Amtoutd = 0) THEN
Feamount = 0
ELSEIF
Feamount ← Amtoutd * Fpercent
Tfamt = Tfamt + Feamount
ENDIF
STOP