Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Find pascal program code: enter all integers in 1~999 that can be divisible by 3 and at least one bit is 5.
Find pascal program code: enter all integers in 1~999 that can be divisible by 3 and at least one bit is 5.
defined variable

I, l, k, j: integer;

A: Integer of array [1..3];

begin

For i:= 1 to 999 do

If my mod 3=0, then

begin

l:= I;

And l>0 do

begin

k:= k+ 1;

a[k]:= l mod 10;

l:= l div 10;

End;

For j:= 1 to k do

If a[j]=5, then

begin

Writeln (1);

k:= 0;

Continue;

End;

k:= 0;

End;

End.