//pascal var a: array [1 .. 5] of integer; k, buf, i, j: integer; arithmean: real; begin for i : = 1 to 5 do begin write('a[', i, '] = '); readln(a[i]); arithmean : = arithmean + a[i]; end; for i : = 1 to 5 - 1 do begin k : = i; for j : = i + 1 to 5 do if a[j] < a[k] then k : = j; buf : = a[i]; a[i] : = a[k]; a[k] : = buf; end; for i : = 1 to 5 do write(a[i]: 4); writeln; writeln('среднее арифметическое = ', (arithmean / 5): 0: 2); end.
1а 2б 3в 4а5 5.22 надеюсь понятно