Uses Crt; Var A,B:integer; P:real; C:boolean; Begin ClrScr; Write('Введите натуральное число: ');ReadLn(B); Write('A = ');ReadLn(A); P:=1; C:=false; B:=Abs(B); While B>0 do Begin P:=P*(B mod 10); if B mod 10 = A then C:=true; B:=B div 10 End; WriteLn('P = ',P); if C then WriteLn('Не верно') else WriteLn('Верно'); ReadLn End.
uses Crt; Var A:integer; Begin ClrScr; For A:= 100 to 999 do if ((A+1) mod 2 = 0)and((A+2) mod 3 = 0)and((A+3) mod 4 = 0)and((A+4) mod 5 = 0) then Write(A,' '); ReadLn; End.
uses Crt; Var A,B,C:integer; Begin ClrScr; Write('Введите натуральное число: ');ReadLn(B); Write('A = ');ReadLn(A); C:=0; While B<>0 do Begin if B mod 10 <> A then C:=C*10+B mod 10; B:=B div 10; End; While C<>0 do Begin B:=B*10+C mod 10; C:=C div 10 End; WriteLn(B); ReadLn; End.
S:string; a, i, k, b, n:integer; begin readln(s); readln(a); k:=1; for i:=1 to length(s) do begin k:=k*val(s[i], n); if val(s[i], n)=a then b:=b+1;end; writeln(k); if b=0 then writeln('yes') else writeln('no'); readln; end. 2 a:array[1..1000] of integer; begin k:=1; for i:=100 to 999 if (((i+1) mod 2))=0) and (((i+2) mod 3)=0) and (((i+3) mod 4)=0) and (((i+4) mod 5)=0) then begin a[k]:=i; k:=k+1; end; for i:=1 to k do writeln(a[i]); readln; end.
3 s, a:string; i, k:integer; begin readln(s); readln(a); for i:=1 to length(s) do if s[i]=a then s[i]:=''; writeln(s); readln; end.
Var
A,B:integer;
P:real;
C:boolean;
Begin
ClrScr;
Write('Введите натуральное число: ');ReadLn(B);
Write('A = ');ReadLn(A);
P:=1;
C:=false;
B:=Abs(B);
While B>0 do
Begin
P:=P*(B mod 10);
if B mod 10 = A then C:=true;
B:=B div 10
End;
WriteLn('P = ',P);
if C then WriteLn('Не верно')
else WriteLn('Верно');
ReadLn
End.
uses Crt;
Var
A:integer;
Begin
ClrScr;
For A:= 100 to 999 do
if ((A+1) mod 2 = 0)and((A+2) mod 3 = 0)and((A+3) mod 4 = 0)and((A+4) mod 5 = 0) then Write(A,' ');
ReadLn;
End.
uses Crt;
Var
A,B,C:integer;
Begin
ClrScr;
Write('Введите натуральное число: ');ReadLn(B);
Write('A = ');ReadLn(A);
C:=0;
While B<>0 do
Begin
if B mod 10 <> A then C:=C*10+B mod 10;
B:=B div 10;
End;
While C<>0 do
Begin
B:=B*10+C mod 10;
C:=C div 10
End;
WriteLn(B);
ReadLn;
End.
a, i, k, b, n:integer;
begin
readln(s);
readln(a);
k:=1;
for i:=1 to length(s) do begin
k:=k*val(s[i], n);
if val(s[i], n)=a then b:=b+1;end;
writeln(k);
if b=0 then writeln('yes')
else writeln('no');
readln;
end.
2
a:array[1..1000] of integer;
begin
k:=1;
for i:=100 to 999
if (((i+1) mod 2))=0) and (((i+2) mod 3)=0) and (((i+3) mod 4)=0) and (((i+4) mod 5)=0) then begin a[k]:=i; k:=k+1; end;
for i:=1 to k do
writeln(a[i]);
readln;
end.
3
s, a:string;
i, k:integer;
begin
readln(s);
readln(a);
for i:=1 to length(s) do
if s[i]=a then s[i]:='';
writeln(s);
readln;
end.