例求两数的最小公倍数function lcm(a,b:integer):integer;beginif a<b then swap(a,b);lcm:=a;while lcm mod b>0 do inc(lcm,a);end;
2 回答
侃侃尔雅
TA贡献1801条经验 获得超16个赞
Exchanges high order byte with the low order byte of an integer or word.
Unit
System
Category
backward compatibility routines
Delphi syntax:
function Swap(X);
Description
In Delphi code, Swap exchanges the high-order bytes with the low-order bytes of the argument. X is an expression of type SmallInt, as a 16-bit value, or Word. This is provided for backward compatibility only.
- 2 回答
- 0 关注
- 1142 浏览
添加回答
举报
0/150
提交
取消