Program p;
var a,s:integer;
Begin
Readln(a, s);
While s <>0 do begin
s := s mod 10;
if (s = a) then begin
writeln('yes');
s :=0;
end
else writeln('no');
if ( a < 10) then writeln('no');
end;
end.
Объяснение:
Program p;
var a,s:integer;
Begin
Readln(a, s);
While s <>0 do begin
s := s mod 10;
if (s = a) then begin
writeln('yes');
s :=0;
end
else writeln('no');
if ( a < 10) then writeln('no');
end;
end.
Объяснение: