Var a,b,p,n:integer;
begin
writeln ('Введите два числа:');
readln (a, b);
n:=abs(b);
if (a=0) or (b=0) then
writeln (a,'*',b,'=0')
else begin
while (n<>0) do begin
n:=n-1;
p:=p+abs(a)
end;
if (a>0) and (b>0) then writeln (a,'*',b,'=',p);
if (a<0) and (b<0) then writeln ('(',a,')','*','(',b,')','=',p); <br>if (a>0) and (b<0) then writeln (a,'*','(',b,')','=-',p); <br>if (a<0) and (b>0) then writeln ('(',a,')','*',b,'=-',p);
end;
end.