You are on page 1of 3

Program Athletic_Sports_Meet_Event;

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]);

write(' Enter the points amassed by the house ');


readln(hpt[i]);
writeln;

IF hpt[i] < 0 Then


repeat
writeln('You have entered an unenforceable value. Please enter a value larger
than 0');
readln(hpt[i]);
writeln;
until hpt[i] > 0;

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;

If hpt[i]< min then


begin
Candidate Name: Amilla Morille
Candidates Registration Number: 1400100922
Centre Number: 140010

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.

Candidate Name: Amilla Morille


Candidates Registration Number: 1400100922
Centre Number: 140010

You might also like