第1个回答 2017-03-18
最开头先
import java.util.Scanner;
然后main里面
Scanner in = new Scanner(System.in);
System.out.println("Please enter the two integers.");
int a = in.nextInt();
int b = in.nextInt();
int c = 0;
if (a >= b)
c = a-b;
else
c = b-a;
System.out.println(c);本回答被网友采纳