type Cl = class
a:integer;
constructor Create(b:integer);
procedure P;
end;
constructor Cl.Create(b:integer);
begin
a := b;
end;
procedure Cl.P;
begin
if (a div 100 > 0) and (a > 0) then
begin
a := a - 1;
writeln('new a = ', a);
end;
end;
var
Obj:Cl;
a :integer;
begin
write('a = ');
readln(a);
Obj := Cl.Create(a);
Obj.P;
Readln;
Obj.Destroy;
end.
1) 77(8)=63(10)
2) 67(10)=1000011(2)
3) 7(10)= 111(2)
4) 13(10)= 1101(2)
Program proga;
var str:string;
i,counter,pos:integer;
k:char;
a:array[1..255] of char;
begin
k:='*';
counter:=0;
writeln('Введите строку');
readln(str);
for i:=1 to length(str) do begin
if str[i]='А' then begin
inc(counter);
Delete(str,i,1);
Insert(k,str,i);
end;
end;
writeln('Количество символов А ',counter);
for i:=1 to length(str) do begin
a[i]:=str[i];
if a[i]='В' then
a[i]:=' ';
write(a[i]);
end;
end.
2*(a*a-b*b)
(a+b)*(c+d)
(2*a+b)/(c-2*d)