Program qq; var a, count2, count3: integer; begin writeln('Введите число'); readln(a); count2:=0; count3:=0; while a>0 do begin if a mod 10 = 2 then count2:=count2+1; if a mod 10 = 3 then count3:=count3+1; a:=a div 10; end; if count2>count3 then a:=count3 else if count3>count2 then a:=count2 else a:=count2; if a<>0 then while a>0 do begin writeln('Выведено число 23'); a:=a-1; end else writeln('Нельзя получить число 23 из цифр введённого числа'); end.
Var z:array[1..16] of integer; k:array[1..16] of real; i,p,s:integer; max:real; Begin randomize; for i:=1 to 16 do z[i]:=random(101); write('Z='); for i:=1 to 16 do write(z[i],' '); writeln; writeln; p:=0; s:=0; for i:=1 to 16 do if (i mod 2)<>0 then begin s:=s+z[i]; p:=p*z[i]; end; writeln('P=',p); writeln('S=',s); writeln; for i:=1 to 16 do k[i]:=z[i]*exp(ln(i*z[i])/3); write('K='); for i:=1 to 16 do write(k[i]:0:0,' '); max:=k[1]; for i:=1 to 16 do if k[i]>max then max:=k[i]; writeln; writeln('max=',max:0:0); for i:=1 to 16 do if k[i]=max then k[i]:=0; write('K='); for i:=1 to 16 do write(k[i]:0:0,' '); End.
var a, count2, count3: integer;
begin
writeln('Введите число');
readln(a);
count2:=0;
count3:=0;
while a>0 do
begin
if a mod 10 = 2 then
count2:=count2+1;
if a mod 10 = 3 then
count3:=count3+1;
a:=a div 10;
end;
if count2>count3 then
a:=count3
else
if count3>count2 then
a:=count2
else
a:=count2;
if a<>0 then
while a>0 do
begin
writeln('Выведено число 23');
a:=a-1;
end
else
writeln('Нельзя получить число 23 из цифр введённого числа');
end.