相关代码 |
|
const a=45,b=27; var x,y,g,m :integer; procedure swap; var temp:integer; begin temp:=x; x:=y; y:=temp; end procedure mod; x=x-x/y*y; begin x:=a; y:=b; while x 0 do begin swap; mod; end; g:=y; m:=a*b/g; write("x=",x); write("g=",g); write("m=",m); end .
相关资源 |
|