BEGIN INTEGER X, N, SUM, MAX; IF LASTITEM THEN OUTTEXT ("NULL LIST") ELSE BEGIN SUM:=MAX:=ININT; N:=1; WHILE LASTITEM DC BEGIN X:=ININT; N:=N+1; IF X > MAX THEN MAX:=X; SUM:=SUM+X; END; OUTTEXT("LIST LENGTH = "); OUTINT (N, 6); OUTTEXT(", HIGHEST = "); OUTINT (MAX, 6); OUTTEXT(", AVERAGE = "); OUTFIX (SUM/N, 2,, 8); END; OUTIMAGE; END
**INPUT 1: **OUTPUT 1: NULL LIST **INPUT 2: 3 1 4 1 5 9 2 6 5 3 5 8 9 7 9 3 2 3 8 4 6 **OUTPUT 2: LIST LENGTH= 21, HIGHEST= 9, AVERAGE= 4.90