【单选题】【消耗次数:1】
在下面循环语句中循环体执行的次数为(????) for(int i=0; in/2) break;
n/2
n/2+1
n/2-1
n-1
参考答案:
复制
纠错
相关题目
【单选题】 在下面循环语句中循环体执行的次数为() for(int i=0; in/2) break;
①  n/2
②  n/2+1
③  n/2-1
④  n-1
【单选题】 在下面循环语句中循环体执行的次数为()。 for(int i=0; in/2) break;
①  n/2
②  n/2+1
③  n/2-1
④  n-1
【单选题】 在下面循环语句中循环体执行的次数为()。 for(int i=0; in/2) break;
①  n/2
②  n/2+1
③  n/2-1
④  n-1
【单选题】 在下面循环语句中内层循环体S语句的执行次数为( )。 for(int i=0;i<n;i++) for(int j=i;j<n;j++)S;
①  n2
②  (n+1)/2
③  n(n-1)/2
④  n(n+1)/2
【单选题】 在下面循环语句中内层循环体S语句的执行总次数为( ) for(int i=0; i<n; i++) for(int j=i; j<n; j++) S;
①  n2
②  (n+1)/2
③  n(n-1)/2
④  n(n+1)/2
【单选题】 在下面循环语句中内层循环体S语句的执行总次数为()。 for(int i=0; i<n; i++) for(int j=i; j<n; j++) S;
①  n2
②  (n+1)/2
③  n(n-1)/2
④  n(n+1)/2
【单选题】 循环语句“for(int i=0; i<n; i++) cout<<i*i<<’ ’;”中循环体执行的次数为()。
①  1
②  n-1
③  n
④  n+1
【单选题】 循环语句“for(int i=0; i<n; i++) cout<<i*i<<’ ’;”中循环体执行的次数为(????)
①  1
②  n-1
③  n
④  n+1
【单选题】 设有定义:intn1=0,n2,*p=&n2,*q=&n1;,以下赋值语句中与n2=n1;语句等价的是()
①  *p=*q;
②  p=q;
③  *p=n1
④  p=*q;
【单选题】 在下面循环语句中内层循环体S语句的执行次数为( )。 for(int i=0;ii++) for(int j=i;jj++)S;
①  n2
②  (n+1)/2
③  n(n-1)/2
④  n(n+1)/2
随机题目
【判断题】 A: How is he? B: He is not very well.
①  正确
②  错误
【单选题】 Mark sometimes [填空] to the cinema with his sister.
①  go
②  gos
③  goes
④  going
【单选题】 There are [填空] books in your bag. But there aren’t [填空] pens in it.
①  some, some
②  any ,some
③  some, any
④  any,any
【单选题】 There [填空] seven days in a week.
①  are
②  is
③  have
④  has
【判断题】 Are these your bags? Yes, they are ours.
①  正确
②  错误
【单选题】 The test [填空] him two hours to finish.
①  take
②  takes
③  took
④  taking
【单选题】 Which is the [填空] to the supermarket?
①  street
②  way
③  road
④  address
【单选题】 If someone calls me, ask him or her to leave a [填空] .
①  message
②  letter
③  sentence
④  notice
【单选题】 You had better [填空] in the hospital.
①  stayed
②  stay
③  stays
④  staying
【单选题】 Will you [填空] this evening?
①  work
②  works
③  working
④  worked