• 2021-04-14
    【填空题】请阅读下面的程序。 public class WhileDemo2 { public static void main(String[] args) { int n=1; int result=1; while(_____<=_____){ result*=n; ______; } System.out.println(result); } } 在空白处填写正确的代码,令程序完成求10的阶乘的功能
  • n","10","n++

    内容

    • 0

      请阅读下面的程序 public class Example { public static void main(String[] args) { int x = 1; do { x++; } while (x <= 4); System.out.println("x = " + x); } } 程序的运行结果是()

    • 1

      关于下面的程序Test.java说法正确的是(     )。 public class Test { String x='1'; int y; public static void main(String args[]) { int z=2; System.out.println(x+y+z); } }

    • 2

      请阅读下面的程序 class WhileDemo4 { public static void main(String[] args) { int n = 5; while (n > 10) { System.out.print(n); n++; } } } 下列选项中,哪一个是程序运行的结果

    • 3

      请阅读下面的程序。 Class WhileDemo5 { public static void main(String[] args) { int n = 5; while (n < 10) { System.out.print(n); n++; } } } 下列选项中,哪一个是程序运行的结果

    • 4

      请阅读下面的程序 class WhileDemo4 { public static void main(String[] args) { int n = 5; while (n > 10) { System.out.print(n); n++; } } } 下列选项中,哪一个是程序运行的结果