program MultiplicationUsingSum;varx, y, product, i: integer;beginproduct := 0;
write('Enter the first number (x): ');readln(x);write('Enter the second number (y): ');readln(y);
if x < 0 then x := -x;if y < 0 then y := -y;
for i := 1 to x dobeginproduct := product + y;end;
if (x < 0) and (y < 0) thenproduct := productelse if (x < 0) or (y < 0) thenproduct := -product;
writeln('The product of ', x, ' and ', y, ' is: ', product);end.
program MultiplicationUsingSum;
var
x, y, product, i: integer;
begin
product := 0;
write('Enter the first number (x): ');
readln(x);
write('Enter the second number (y): ');
readln(y);
if x < 0 then x := -x;
if y < 0 then y := -y;
for i := 1 to x do
begin
product := product + y;
end;
if (x < 0) and (y < 0) then
product := product
else if (x < 0) or (y < 0) then
product := -product;
writeln('The product of ', x, ' and ', y, ' is: ', product);
end.