Program Calc; uses crt; //crt is a unit packaged with the compiler. it contains such functions as clrscr; which clears the screen. var a : integer; //this is a numerical value for saying who has how many points b : integer; c : integer; d : integer; e : integer; f : integer; av : integer; //this states the position in the lineup bv : integer; cv : integer; dv : integer; ev : integer; fv : integer; begin if a > b then begin //a is greater than b, so a should be in first. av := 1; end else begin bv := 1; av := 2; end; //a should be second because a is less than b. if (b > c) and (bv = 1) then begin //b is greater than c and is already in first, so if c is greater than a then a should be 3rd and //c should be 2nd. bv := 1; if c > a then begin cv := 2; av := 3; end; end else if (b > c) and (bv = 2) then begin av := 1; bv := 2; cv := 3; end; end.