Var i,x,a,b,c,d,count:integer;
begin
count:=0;
for i:=1000 to 9999 do begin
a:=i div 1000;
b:=(i div 100) mod 10;
c:=(i mod 100) div 10;
d:=i mod 10;
if (a<>b) and (a<>c) and (a<>d) and (b<>c) and (b<>d) and (c<>d) then
if (a>b) and (b>c) and (c>d) then begin
count:=count+1;
write(i,' ');
end;
end;
writeln;
writeln('Количество: ',count);
<span>end.</span>
Вариант ответа 4 - PPT
P.S. Во втором варианте буква X означает что у презентации будет совместимость со старыми версиями PowerPoint( вроде бы с 1997-2003)
1. program ex1;
uses crt;
var i, count : integer;
begin
count:=0;
for i:=1 to 9999 do
begin
if (i mod 5 = 0) and (i mod 7 = 0) then
begin
writeln(i);
count:=count+1;
if count=10 then
break;
end;
end;
end.
2. program ex2;
var sum, count, n : integer;
begin
count:=0;
n:=9999;
sum:=0;
while not (n = 0) do
begin
readln(n);
if (not n mod 2 = 0) and (n>0) then
begin
sum:=sum+n;
count:=count+1;
end;
end;
writeln('Ср. арифм. = ', sum/count);
end.
3. program ex1;
var price, i: integer;
begin
write('Введите цену товара за 1 кг. :');
readln(price);
for i:=1 to 15 do
write(i:6, '|');
writeln();
for i:=1 to 15 do
write('-------');
writeln();
for i:=1 to 15 do
write((price/10*i):6,'|');
end.