1个回答
2020-05-20
展开全部
public class NumAbs {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.println("input one number: ");
int inputNumber = scanner.nextInt();
System.out.println(inputNumber + " 的绝对值是: " + Math.abs(inputNumber));
}
}
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.println("input one number: ");
int inputNumber = scanner.nextInt();
System.out.println(inputNumber + " 的绝对值是: " + Math.abs(inputNumber));
}
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询