The code is not working it said there is an error at line 12. Resolve it and
Fantastic news! We've Found the answer you've been seeking!
Question:
The code is not working it said there is an error at line 12. Resolve it and show a screenshot of the run code output
// Pseudocode without Const keyword // Defining constant values Fpercent = 0.045; NumofMonths = 12; Monthlyrate1 = 50.00; Monthlyrate2 = 100.00; Monthlyrate3 = 150.00; Monthlyrate4 = 200.00; // Declaring variables FName, LName, Category: String; AMTdue, AMToutd, AMTpaid, Feamount, Ovtotal, Max_AMToutd, Tfamt, Avfine: Real; Tno_outppl, Count: Integer; // Initialization of variables Ovtotal := 0.00; Tfamt := 0.00; Tno_outppl := 0; Max_AMToutd := 0.00; // Loop for 24 members For Count := 1 to 24 do Begin // Input details for each member WriteLn('Please enter first name'); ReadLn(FName); WriteLn('Please enter last name'); ReadLn(LName); WriteLn('Please enter category'); ReadLn(Category); WriteLn('Please enter amount paid'); ReadLn(AMTpaid); // Calculating amount due based on member's category rate If (Category = 'ST') then AMTdue := NumofMonths * Monthlyrate1 Else if (Category = 'AS') then AMTdue := NumofMonths * Monthlyrate2 Else if (Category = 'FU') then AMTdue := NumofMonths * Monthlyrate3 Else AMTdue := NumofMonths * Monthlyrate4; // 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 := AMToutd * Fpercent Else Feamount := 0; Tfamt := Tfamt + Feamount; // Counting the number of members with outstanding costs If (AMToutd > 0) then Tno_outppl := Tno_outppl + 1; // Calculating the maximum outstanding amount If (AMToutd > Max_AMToutd) then Max_AMToutd := AMToutd; // Outputting the details for each member WriteLn('Your first name is ', FName); WriteLn('Your last name is ', LName); WriteLn('Your category is', Category); WriteLn('Your amount due is $', AMTdue); WriteLn('Your amount paid is $', AMTpaid); WriteLn('Your amount outstanding is $', AMToutd); WriteLn('Your fine amount is $', Feamount); Ovtotal := Ovtotal + AMTpaid; // Calculating total amount paid End; Avfine := Tfamt / Tno_outppl; // Calculating average fine amount // Outputting overall amounts WriteLn('The total paid is $', Ovtotal); WriteLn('The maximum outstanding amount is $', Max_AMToutd); WriteLn('The number of people with outstanding amount is ', Tno_outppl); WriteLn('The average fine is $', Avfine); End.
Related Book For
Posted Date: