Program red;
var a,b,c:integer;
begin
b:=0;
readln(a);
if a<10 then
begin
if a*5=0 then b:=1;
end;
if (a>=10) and (a<100) then
begin
if ((a div 10)*5=0) then b:=1;
if ((a mod 10)*5=0) then b:=1;
end;
if (a>=100) and (a<1000) then
begin
if ((a div 100)*5=0) then b:=1;
if (((a div 10) mod 10)*5=0)then b:=1;
if ((a mod 10)*5=0)then b:=1;
end;
if b=1 then writeln('yes') else writeln('no');
end.
что бы команды были гарантированно выполненны по крайней мере один раз нужно использовать цикл с постусловием Repeat
repeat
<em>операторы</em>
until <em>условие</em>
01010101₂ = 0+2⁶+0+2⁴+0+2²+0+2⁰ = 64+16+4+1 = 85₁₀
11111000₂ = -(1111000₂) = -(2⁶+2⁵+2⁴+2³+0+0+0) = -(64+32+16+8) = -120₁₀