package cn.cx.my;
public class Hello {
public static void main(String[] args) throws Exception {
System.out.println(f(5, 2));
}
//计算两个数字的最小公倍数
public static int f(int a, int b) {
for (int i = a;; i += a) {
if (i%b==0) {
return i;
}
}
}
}
转载请注明原文地址: https://ju.6miu.com/read-1301356.html