var mas:array[0..9] of integer; i,max,min,k:integer; arifm:real; begin k:=0; arifm:=0; Randomize; for i:=0 to 9 do mas[i]:=Random(15); for i:=0 to 9 do write(mas[i],' '); {poisk max} max:=mas[0]; for i:=1 to 9 do if max<mas[i] then max:=mas[i]; {poisk min} min:=mas[0]; for i:=1 to 9 do if min>mas[i] then min:=mas[i]; arifm:=(max+min)/2; writeln('max: ',max); writeln('min: ',min); writeln('arifm: ',arifm:0:3); for i:=0 to 9 do if mas[i]<arifm then inc(k); writeln('k: ',k); readln; end.
var a: integer;
var t: real;
begin
readln(a);
t:= (a div 10) * (a mod 10) / 2;
writeln(t)
end.
var a: integer;
begin
readln(a);
writeln((a div 10) - (a mod 10))
end.
var a: integer;
begin
readln(a);
writeln((a div 1000), " килограмм ", (a mod 1000), " грамм")
end.
var a: integer;
begin
readln(a);
writeln(a div 10000)
end.
var a, b, c, d: integer;
begin
readln(a);
d:= a div 38400;
a:= a mod 38400;
c:= a div 3840;
a:= a mod 3840;
b:= a div 96;
a:= a mod 96;
writeln(d, " берковцев ", c, " пудов ", b, " фунтов ", a, " золотников")
end.
i,max,min,k:integer;
arifm:real;
begin
k:=0;
arifm:=0;
Randomize;
for i:=0 to 9 do
mas[i]:=Random(15);
for i:=0 to 9 do
write(mas[i],' ');
{poisk max}
max:=mas[0];
for i:=1 to 9 do
if max<mas[i] then
max:=mas[i];
{poisk min}
min:=mas[0];
for i:=1 to 9 do
if min>mas[i] then
min:=mas[i];
arifm:=(max+min)/2;
writeln('max: ',max);
writeln('min: ',min);
writeln('arifm: ',arifm:0:3);
for i:=0 to 9 do
if mas[i]<arifm then
inc(k);
writeln('k: ',k);
readln;
end.