PascalABC.NET
begin
var x := ReadInteger('x=');
var y := ReadInteger('y=');
var a := x;
var b := y;
while b <>0 do
a := a mod b;
Swap(a,b)
end;
var NOD := a;
var NOK := x * y div NOD;
Print('НОД =', NOD, ' НОК =', NOK)
end.
PascalABC.NET
begin
var x := ReadInteger('x=');
var y := ReadInteger('y=');
var a := x;
var b := y;
while b <>0 do
begin
a := a mod b;
Swap(a,b)
end;
var NOD := a;
var NOK := x * y div NOD;
Print('НОД =', NOD, ' НОК =', NOK)
end.