Professional Documents
Culture Documents
Var
i, total, max,min:integer;
hpt:array[1..4]of integer;
house:array[1..4] of string;
maxhouse,minhouse:string;
maxamt,minamt,totalamt:real;
BEGIN
i:=0;
total:=0;
max:=0;
min:=1000;
maxhouse:='';
minhouse:='';
totalamt:=140000;
for i:= 1 to 4 do
begin
house[i]:='';
hpt[i]:=0;
end;
For i:= 1 to 4 do
begin
write('Enter the house name');
Candidate Name: Amilla Morille
Candidates Registration Number: 1400100922
Centre Number: 140010
readln(house[i]);
total:=total + hpt[i];
end;
For i:= 1 to 4 do
begin
If hpt[i]> max then
begin
max:= hpt[i];
maxhouse:= house[i];
end;
min:=hpt[i];
minhouse:=house[i];
end;
End;
maxamt:=0.45*140000;
minamt:=0.17*140000;
writeln;
writeln('The victorious house was ',maxhouse);
writeln('The treasuries award to ',maxhouse,'is $',maxamount:5:2);
writeln('Victorious house points: ',max);
writeln('The trailing house was ',minhouse);
writeln('The lowest score was ',min);
writeln(minhouse,' received $Content ',minamt:5:2);
writeln('The total house points was: ',total);
END.