package clong.jgsu; import java.util.Scanner; public class code_6 { public static void main(String[] args) { /** * é¢ç®ï¼è¾å ¥ä¸¤ä¸ªæ£æ´æ°månï¼æ±å ¶æå¤§å ¬çº¦æ°åæå°å ¬åæ°ã */ System.out.println("请è¾å ¥ä¸¤ä¸ªæ´æ°ï¼"); Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int bigDivisor = 0; int multiple = 0; int sum = a*b; int temp = 0; if(b>a){ temp = a; a = b; b = temp; } while(temp!=0){ temp = a%b; a = b; b = temp; } bigDivisor = a; multiple = sum/bigDivisor; System.out.println("æå¤§å ¬çº¦æ°ï¼"+bigDivisor); System.out.println("æå°å ¬åæ°ï¼"+multiple); sc.close(); } }