判断输入的是否为数字
public static void main(String[] args){ Scanner scanner = new Scanner(System.in); System.out.println("请输入一个数"); String next; double num = 0; while (true) { next = scanner.next(); if (next.equals("exit"))