Question
My pseudocode is given the: error: only single target (not tuple) can be annotated. Line 10>>>> this is my code Const Fpercent = 0.045;
My pseudocode is given the: "error: only single target (not tuple) can be annotated. Line 10>>>> this is my code
Const
Fpercent = 0.045;
NumofMonths = 12;
Monthlyrate1 = 50.00;
Monthlyrate2 = 100.00;
Monthlyrate3 = 150.00;
Monthlyrate4 = 200.00;
Var
FName, LName, Category: String;
AMTdue, AMToutd, AMTpaid, Feamount, Ovtotal, Max_AMToutd, Tfamt, Avfine: Real;
Tno_outppl, Count: Integer;
begin
// 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.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started