更多"下列程序段的执行结果为______。 i=4 a=5 "的相关试题:
[单项选择]下列程序段的执行结果为 I=4 x=5 Do I=I + 1 X=K^2 Loop Until I>=7 Print"I=";I Print"x=";xA)I=4
x=258694
B)I=7 x=256987
C)I=6 x=365840
D)I=7 x=390625
[填空题]下列程序段的执行结果是______。
i=4
a=5
Do
i=i+1
a=a+2
Loop Until i>=7
Print "A=";a
[填空题]下列程序段的执行结果是______。
i=4
a=5
Do
i=i+1
a=a+2
Loop Until i>=7
Print "A=";a
[单项选择]下列程序执行后的输出结果为:
K=1
DO 10 I=1,2
DO 10 J=1,2
<10 K=K*I/J
WRITE(*,*)K
END
A. 1
B. 0
C. 0.5
D. 2
[单项选择]下面程序段的执行结果是______。
i=3;
do
printf("%2d",i--);
while(!i);
A. 3
B. 321
C. 不打印任何内容
D. 陷入死循环
[填空题]下列程序段的执行结果是 【14】 。
For I = 1 to 5
Clls
Print "I =" , I
NEXT
[填空题]
执行以下程序段后,屏幕显示的运行结果为()。
【程序清单】
CLEAR
x=12
Do WHILE .T.
x=x+1
IF x=INT(x/4)*5
x
ELSE
LOOP
ENDIF
IF X>10
EXIT
ENDIF
ENDD0
[填空题]下列程序段的执行结果为 【13】 。
Dim A (10,10)
For i = 2 To 4
For j =4 To 5
A(i,j) =i*j
Next
Next
Print A (2,5) +A(3,4) +A(4,5)
[填空题]下列程序段的执行结果为 【13】 。
Dim A (10,10)
For i = 2 To 4
For j =4 To 5
A(i,j) =i*j
Next
Next
Print A (2,5) +A(3,4) +A(4,5)
[填空题]根据下列程序的执行结果,可以断定划线部分的修饰符应为 【14】 。
执行结果:
i9a football is created.
a football is created.
i=10
a football is destroyed.
a football is created.
i=20
a football is destroyed.
a football is destroyed.
源程序:
# inelude<iostream. h>
class Footballpublic:
Football( ) cout<<"a football is created. "<<end1;
~Football( ) cout<<"a football is destroyed. "<<end1;
;
void func(int i) ______ Football f1;
Football f2;
cout<<"i= "<<i<<end1;void main( ) func(10);
func(20);
[填空题]根据下列程序的执行结果,可以断定划线部分的修饰符应为 【14】 。
执行结果:
i9a football is created.
a football is created.
i=10
a football is destroyed.
a football is created.
i=20
a football is destroyed.
a football is destroyed.
源程序:
# inelude<iostream. h>
class Football
{
public:
Football( ) {cout<<"a football is created. "<<end1; }
~Football( ) {cout<<"a football is destroyed. "<<end1;
};
void func(int i)
{
______ Football f1;
Football f2;
cout<<"i= "<<i<<end1;
}
void main( )
{
func(10);
func(20);
}
[单项选择]在执行完此程序段后,i,j值为
int i=1,j=10;
do
if(++i>j--)continue;
while(i<5);
A) i=6 and j=5 B) i=5 and j=5
C) i=6 and j=4 D) i=5 and j=6
[单项选择]下面程序段的执行结果是( )。
main( )
int a[5][5],i,j;
for(i=1;i<5;i++)
for(j=1;j<5;j++)
a[i][j]=(i<j)*(j/i);
for(i=1;i<5;i++)
for(j=1;j<5;j++)
printf("%2d",a[i][j]);
printf("/n");
A. 1111
B. 0001
C. 1000
D. 0000
[填空题]下列程序段的执行结果为 【14】 。
K=0
For J=1 To 2
For I=1 To 3
K=I+1
Next I
For I=1 To 7
K=K+1
Next I
Next J
Print K
[填空题]下列程序段的执行结果为 【14】
K=0
For J=1 To 2
For I=1 To 3
K=I+1
Next I
For I=1 To 7
K=K+1
Next I
Next J
Print K
[填空题]以下程序段的执行结果是______。
int i =0;
outer:while(true)
{
i++;
inner:for(int j = 0; j <10; j++)
{
i += j;
if(j == 3)
continue inner;
break outer;
}
continue outer;
}
System. out .println (i);