Var A,k,S,M:integer; P:real; Begin Write('Введите натуральное число: ');ReadLn(A); k:=0; S:=0; P:=1; While A>0 do Begin M:=A mod 10; if M = 3 then k:=k+1 else Begin if M > 5 then S:=S+M; if M > 7 then P:=P*M; End; A:=A div 10; End; WriteLn('k = ',k); WriteLn('S = ',S); WriteLn('P = ',P); End.
Var A:integer; Max,Min,M:byte; Begin Write('Введите натуральное число: ');ReadLn(A); Max:=0; Min:=10; While A>0 do Begin M:=A mod 10; if M<Min then Min:=M; if M>Max then Max:=M; A:=A div 10; End; WriteLn('Min = ',Min); WriteLn('Max = ',Max); End.
A,k,S,M:integer;
P:real;
Begin
Write('Введите натуральное число: ');ReadLn(A);
k:=0;
S:=0;
P:=1;
While A>0 do
Begin
M:=A mod 10;
if M = 3 then k:=k+1
else
Begin
if M > 5 then S:=S+M;
if M > 7 then P:=P*M;
End;
A:=A div 10;
End;
WriteLn('k = ',k);
WriteLn('S = ',S);
WriteLn('P = ',P);
End.
Var
A:integer;
Max,Min,M:byte;
Begin
Write('Введите натуральное число: ');ReadLn(A);
Max:=0;
Min:=10;
While A>0 do
Begin
M:=A mod 10;
if M<Min then Min:=M;
if M>Max then Max:=M;
A:=A div 10;
End;
WriteLn('Min = ',Min);
WriteLn('Max = ',Max);
End.