public static void main(String[] args) { int n; System.out.print("输入n:"); n = new Scanner(System.in).nextInt(); System.out.printf("2n = %d%n", 2 * n); if (n >= 0 && n < 31) { System.out.printf("2^%d = %s%n", n, Math.pow(2, ...