当前位置: 答题翼 > 问答 > 计算机类考试 > 正文
目录: 标题| 题干| 答案| 搜索| 相关
问题

给出下面程序的输出结果。include<iostream>using namespace std;void main(){int num=0 i=


给出下面程序的输出结果。

include<iostream>

using namespace std;

void main()

{

int num=0,i=8;

do

{

i--;

num++;

}while(--i);

cout<<num<<endl;

}

请帮忙给出正确答案和分析,谢谢!

参考答案
您可能感兴趣的试题
  • ● 下面程序运行后的输出结果是 (59) 。 #include &lt;stdio.h&gt; #include &lt;string.h&gt; voi

  • 以下程序的输出结果是【 14 】#include &lt;stdio.h&gt; #include &lt;stdio.h&gt;#include &lt;st

  • 下面程序的输出结果是#include &lt;stdio.h&gt;main(){int i=2;printf("%d",f(i,i+1) );}int f(i

  • 当执行下面的程序时,如果输入ABC,则输出结果是()。#include&lt;stdio.h&gt;#include&lt;string.h

  • 若输入“abcdef”“abdef” 下述程序的输出结果为( )。 #include<stdio.h> #include<string.

  • 下面程序的输出结果是 #include<stdio.h> main() {int a[]={1 2 3 4 5 6 7 8 9 0} *p; p=a