program Multiplication;
varx, y, product: integer;
beginwriteln('Enter first number: ');readln(x);
writeln('Enter second number: ');readln(y);
product := 0;
while y > 0 dobeginif y mod 2 = 1 thenproduct := product + x;
end;
writeln('Product is: ', product);end.
program Multiplication;
var
x, y, product: integer;
begin
writeln('Enter first number: ');
readln(x);
writeln('Enter second number: ');
readln(y);
product := 0;
while y > 0 do
x := x shl 1;begin
if y mod 2 = 1 then
product := product + x;
y := y div 2;
end;
writeln('Product is: ', product);
end.