You are on page 1of 4

Algorithm

Start

//Variable Declaration

Declare the three arrays needed

F_Name;//insert your data type here;

Last_Name:

Amount _Paid:;

Section:;

Total_People_1:;

Total_Money_1:;

Total_People_2:;

Total_Money_2:;

Tatal_People_3:;

Total_Money_3:;

Total_People_4:;

Total_Money_4:;

Total_People_5:;

Total_Money_5:;

a:;

count:;

z:;

Begin

//initialization of variables

Section:’ ‘;//to enter section name

Total_People_1:=0;

Total_Money_1:=0.00;

Total_Money_2:0;

Total_Money_2:=0.00;
Total_People_3:=0;

Total_Money_3:=0.00;

Total_People_4:=0;

Total_Money_4:=0.00;

Total_People_5:=0;

Total_Money_5:=0.00;

Grand_Total:=0;

Count:=0;

Write(‘enter First_Name or END to stop’);

Enter(Frist_name);//the signal to continue or stop the program

While F_Name<> ’END’ do begin//Begin while loop

Count :=count+1://to count the number of masqueraders

First_Name_Array|count| :=F_Name;//to count First_Name_Array

Write(‘Last_nmae_Array’);//to output Last_Name

Read(Last_name);//to readlast name

Last_Name_Array|count| :=Las_Name;//To count Last Name;//to count Last_Name_Array

Write(‘Amount_Paid’);//to output Amount_Paid

Enter(amount_paid);//to read amount

If Amount_Paid - 1009.80 then begin//begin if statement

Section:=The Rangulars’://the name of the section

Total_People_1:=Total_People_1+1;//increment count

Total_money_1:=Total_Money_1+Amount_Paid;//calculate Total_Money

End//end of if statement

Else if Amount_Paid=1366.20 then begin// if statement

Section:=The scholars’//the name of the section


Total_People_2:=Total peple_2+1;//increment count

Total_Money_2:=Total_Money_2+Amount_Paid;//to calculate Total_Money

End//end of if statement

Else if Amount_Paid = 1722.60 then begin//begin if statement

Section:=The bolders’;//the name of the section

Total _People_3:=Total_People_3+1;//increment count

Total_Mony_3:=Total_Money_3+Amount_Paid;//to calculate Total_Money

End//end of if statement

Else if Amount_Paid = 2138.40 then begin//begin if statement

Section:=The Legends’;//the name of the section

Total_People_4:=Total_People_4+1;//increment count

Total_Money_4:=Total_Money_4+Amount_Paid;//to calculate Total_Money

End//end if statement

Else if Amount_Paid = 2678.00 then begin//begin if statement

Section:= The Keepers’;//the name of the section

Total_People_5:=Total_People_5+1;//increment count

Total_Money_5:=Total_Money_5+Amount_Paid;//to calculate Total_Money

End//end of if statement

Else;//end if

Section_Name_Array|count| :=Section;//to count Section_Name_Array

Display(‘enter First_Name or END to stop’)

Read(F_Name);//the signal to continue or stop the program


End;//end while loop

Total_People:=Total_People_2+Total_People_3+Total_People_4+Total_People_5;//to calculate
Total_People

You might also like