更多"下面程序的执行结果是______。 #include <iostre"的相关试题:
[填空题]下面程序的执行结果是 [7] 。
#include<iostream.h>
void main( ){
int a=0,b=2,c=0,d=30;
if(a)
d=d-10;
else if(B)
if(!C)
d=15;
else d=20;
cout<< “d=” <<d<<end1;
[填空题]下面程序的执行结果是 【15】 。
#include <iostream.h>
void main( )
int n=0,x=0;
do
n++;
if(n%3==2&&n%5==3&&n%7==2)
x=1;
while(x!=1);
cout<<"n="<<n<<end1;
[填空题]下面程序的输出结果是 【9】 。
#include < iostream.h>
void main( )
int a[6]=1,2,3,4, 5,6;
for(int i=0;i<5;i++)
cout << a[i]<<" ";
cout << end1;
[填空题]下面程序的运行结果是 ______。
#include<iostream.h>
void main( )
char str[]="SSSWLIA",c;
int k;
for(k=2;(c=str[k]!=’/0’;k++)
switch(c)
case’I’:++k;break;
case’l’;continue;
default;cout<<c;continue;
cout<<’*;
[填空题]以下程序的执行结果是 ______。
#include<iostream.h>
void main( )
int a=o,b=1,c=0,d=20;
if (
- a) d=d-10;
else if(! - b)
if(! - c) d=15;
else d = 25;
cout<<"d="<< d << endl;
[填空题]下面程序的执行结果是 【15】 。
#include <iostream.h>
void main( )
{
int n=0,x=0;
do
{
n++;
if(n%3==2&&n%5==3&&n%7==2)
x=1;
} while(x!=1);
cout<<"n="<<n<<end1;
}
[填空题]下面程序的执行结果是 【15】 。
#include <iostream. h>
void main( )
{
int n=0,x=0;
do
{
n++;
if(n%3==2&&n%5==3&&n%7==2)
x=1;
}while(x!=1);
cout<<"n=" <<n<<end1;
}
[填空题]下面程序的执行结果是 【15】 。
#include <iostream. h>
void main( )int n=0,x=0;
don++;
if(n%3==2&&n%5==3&&n%7==2)
x=1;
while(x!=1);
cout<<"n=" <<n<<end1;
[填空题]下面程序的执行结果是
[7] 。
#include<iostream.h>
void main( )
int a=0,b=2,c=0,d=30;
if(
- a)
d=d-10;
else if(B)
if(!C)
d=15;
else d=20;
cout<< “d=” <<d<<end1;
[填空题]以下程序的输出结果是 【7】 。
#include<iostream.h>
void main( )
int a=0;
a+=(a=8);
cout< <a;
[填空题]以下程序输出的结果是 【7】 。
#include<iostream.h>
void main( )
{
int a=5,b=4,c=3,d;
d=(a>b>C) ;
cout<<d;
}
[填空题]以下程序的输出结果是 [11] 。
#include<iostream. h>
void main( )
int a[]= 1, 3, 5, 7, *p=a, i;
for (i=0; i<4: i++)
a[i]=*p++;
cout<<a[2];
[填空题]以下程序的输出结果是 [10] 。
#include<iostream. h>
void main( )
int *p;
p=new int;
*p=200;
cout<<*p;
delete p;