Ответ:
var numbers, elem, summa, save:integer;
begin
readln(numbers);
save := numbers;
while numbers <> 0 do
elem := numbers mod 10;
summa := summa + elem;
numbers := numbers div 10;
end;
if (summa mod 2=0) then
writeln(save * 2)
else
writeln(save / 3);
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
var numbers, elem, summa, save:integer;
begin
readln(numbers);
save := numbers;
while numbers <> 0 do
begin
elem := numbers mod 10;
summa := summa + elem;
numbers := numbers div 10;
end;
if (summa mod 2=0) then
writeln(save * 2)
else
writeln(save / 3);
end.