1)
var i: integer;
begin
for i:=1000 to 9999 do
if((i div 1000)+(i mod 10)=(i mod 100 div 10)*(i mod 1000 div 100))
then write(i,' ');
end.
2)
for i:=10 to 99 do if ((i*3) mod 10=7) then write(i,' ');
===== PascalABC.NET =====
// 1
for var i := 1000 to 9999 do
if i div 1000 + i mod 10 =
(i div 100 mod 10) * (i mod 100 div 10) then
Print(i);
Println;
// 2
for var i := 10 to 99 do
if i * 3 mod 10 = 7 then
Print(i)
1)
var i: integer;
begin
for i:=1000 to 9999 do
if((i div 1000)+(i mod 10)=(i mod 100 div 10)*(i mod 1000 div 100))
then write(i,' ');
end.
2)
var i: integer;
begin
for i:=10 to 99 do if ((i*3) mod 10=7) then write(i,' ');
end.
===== PascalABC.NET =====
begin
// 1
for var i := 1000 to 9999 do
if i div 1000 + i mod 10 =
(i div 100 mod 10) * (i mod 100 div 10) then
Print(i);
Println;
// 2
for var i := 10 to 99 do
if i * 3 mod 10 = 7 then
Print(i)
end.