program fantscrin;
const n = 10;
var a: array [1..n] of integer;
i,min,max: integer;
begin
for i: =1 to n do
a[i]: = random(10)+1;
for i: =1 to n do
write(a[i], ' ');
min: =a[1];
for i: =1 to n do
if (a[i]< min) then min: =a[i];
max: =a[1];
for i: =1 to n do
if (a[i]> max) then max: =a[i];
writeln('');
writeln(min+max);
end.
program fantscrin;
const n = 10;
var a: array [1..n] of integer;
i,min,max: integer;
begin
for i: =1 to n do
a[i]: = random(10)+1;
for i: =1 to n do
write(a[i], ' ');
min: =a[1];
for i: =1 to n do
if (a[i]< min) then min: =a[i];
max: =a[1];
for i: =1 to n do
if (a[i]> max) then max: =a[i];
writeln('');
writeln(min+max);
end.
Поделитесь своими знаниями, ответьте на вопрос:
10 в 16-тиричной перевести в десятичную: )