android:inputType="numberDecimal" private InputFilter lengthFilter = new InputFilter() { @Override public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend) { // source:当前输入的字符 // start:输入字符的开始位置 //
public static void main(String[] args){ Scanner sc = new Scanner (System.in); int a,b; System.out.println("请输入两个正整数:"); a = sc.nextInt(); b = sc.nextInt(); System.out.println("您输入的数是:" + a +"和"+b); int age[] = new int[
import java.util.Scanner; //输入两个正整数m和n,求其最大公约数和最小公倍数.15 20 5 public class Test { public static void main(String[] args) { int n = inNumber(); int m = inNumber(); int yue = 1; int bei = m*n; for (int i = 2; i < n*m; i++) { if (m % i == 0 && n %
import java.util.Scanner; public class Oujilide欧几里得 { public static void main(String[] args) { // TODO Auto-generated method stub Scanner in=new Scanner(System.in); int n=in.nextInt();//第一个数 int m=in.nextInt();//第二个数 System.out.print("最大公约数为");