求最小公倍数的最简模板

public class Main128 {

     
     public static int f(int a, int b)  
        {  
            int i;  
            for(i=a;;i+=a){ // 填空   
                if(i%b==0) return i;  
            }  
        }  
        public static void main(String[] args){  
            System.out.println(f(6,8));  
        }  

}

 

posted @ 2019-03-04 00:23  一世安然L  阅读(243)  评论(0)    收藏  举报