var x, y, z: integer;
r, a, b: integer;
begin
readln(x, у);
if у > x then begin
z:= x; x:= у; у:= z;
end;
a:= x; b:= y;
while b > 0 do begin
r:= a mod b;
a:= b;
b:= r;
end;
writeln(a);
writeln(x);
write(у);
end.
|
int x, y, z,
r, a, b;
scanf("%d%d",&x,&y);
if (у > x) {
z = x; x = у; у = z;
};
a = x; b = y;
while (b > 0) {
r = a % b;
a = b;
b = r;
}
printf("%d\n",a);
printf("%d\n",x);
printf("%d",y);
|