Java 实现输入整数输出其绝对值
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int i = scanner.nextInt();
int f = Math.abs(i);
System.out.println(f);
}
}
原文地址: https://www.cveoy.top/t/topic/nacx 著作权归作者所有。请勿转载和采集!