var i, a, b, c, d: integer;
begin
for i:= 1000 to 9999 do
a := i div 1000;
b := (i mod 1000) div 100;
c := (i mod 100) div 10;
d := i mod 10;
if (a = 3) or (b = 3) or (c = 3) or (d = 3) then write(i, ' ');
end;
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
var i, a, b, c, d: integer;
begin
for i:= 1000 to 9999 do
begin
a := i div 1000;
b := (i mod 1000) div 100;
c := (i mod 100) div 10;
d := i mod 10;
if (a = 3) or (b = 3) or (c = 3) or (d = 3) then write(i, ' ');
end;
end.