• 2022-06-07
    使用while 语句实现打印出1至10.count = 1while ( ) print (count) count = count + 1
    A: count
    B: True
    C: count
    D: count
  • A

    内容

    • 0

      阅读以下程序public class Count{static int count;int number;public Count(){count = count + 1;number = count;}}class Test{public static void Main(){Count a = new Count();Count b = new Count();Count c = new Count();}}程序运行后,对象a的count值是() A: 0 B: 1 C: 2 D: 3

    • 1

      下面程序的运行结果是()。#includeintmain(){inta,s,n,count;a=2;s=0;n=1;count=1;while(count<=7){n=n*a;s=s+n;++count;}printf(“%d”,s);return0;}

    • 2

      The output of the following code is ____.<br/>count = 1; /* initialize count */ while (count &lt;= 10) { printf("%d ",count); count++; /* increment count */ } A: 1 1 1 1 1 1 1 1 … B: 1 2 3 4 5 6 7 8 9 C: 1 2 3 4 5 6 7 8 9 10 D: 1 2 3 4 5 6 7 8 9 10 11

    • 3

      count = 0while count &lt; 5: print( count) count = count + 2print( “Over!")

    • 4

      for(count = 1;sum=0; count <=10; count++)是正确的for语句