Var n, amount, max_digit, copy_of_n: integer;
begin
read(n);
copy_of_n := n;
amount := 0;
max_digit := copy_of_n mod 10;
while copy_of_n <> 0 do
begin {Находим наибольшую цифру в числе}
if max_digit < copy_of_n mod 10
then
max_digit := copy_of_n mod 10;
copy_of_n := copy_of_n div 10;
end;
copy_of_n := n;
while copy_of_n <> 0 do {Считаем количество таких цифр}
begin
if copy_of_n mod 10 = max_digit
then
amount := amount + 1;
copy_of_n := copy_of_n div 10;
end;
writeln(amount);
<span>end.</span>
Var s : string;
var t : string;
begin
writeln ('Введите S:');
readln (s);
writeln ('Введите T:');
readln (t);
writeln (s+t);
end.
const
n = 3;
var
s,i : integer;
begin
for i := 1 to n do
if odd(i) then
s := s + i * i * i
else
s := s + i * i;
writeln (s);<span>
end.</span>