运行下列程序,结果是Private Sub Command32_Click()f0=1:f1=1:k=1Do While k=5f=f0+f1f0=flf1=fk=k+1LoopMsgBox“f=”&fEnd SubA.f=5B.f=7C.f=8D.f=13
运行下列程序,结果是
Private Sub Command32_Click()
f0=1:f1=1:k=1
Do While k<=5
f=f0+f1
f0=fl
f1=f
k=k+1
Loop
MsgBox“f=”&f
End Sub
A.f=5
B.f=7
C.f=8
D.f=13
相关考题:
以下程序运行后的输出结果是【】。includemain(){int k=1,s=0; do{ if((k%2)!=0)continue; 以下程序运行后的输出结果是【 】。include<stdio.h>main(){ int k=1,s=0;do{if((k%2)!=0) continue;s+=k; k++;}while(k>10);printf("s+%d\n",s);}
下面程序的运行结果是______。includemain(){ int y,a;y=2,a=1;while(y--!=-1){do{a*=y; 下面程序的运行结果是______。include<stdio.h>main(){ int y,a;y=2,a=1;while(y--!=-1){do{a*=y;a++;}while(y--);}printf("%d,%d",a,y);}
运行下列程序,结果是( )。 PrivateSub Command32_click f0=1:fl=1:k=1Do While k=5f=f0+f1 f0=fl fl=f k=k+1 Loop MsgBox”f=”&f End SubA.f=5B.f=7C.f=8D.f=13
(32)运行下列程序,结果是Private Sub Command32_Click()f0=1:f1=1:k=1Do While k=5f=f0+f1f0=f1f1=fk=k+1LoopMsgBox "f="fEnd SubA)f=5B)f=7C)f=8D)f=13
17、以下能够实现计算5!的程序段是()A.int fac=1,k=0; do{ k++; fac*=k;} while(k<5);B.int fac=0,k=1; do{ fac*=k; k++;} while(k<5);C.int fac=1,k=1; do{ k++; fac*=k;} while(k<=5);D.int fac=1,k=0; do{ fac*=k; k++;} while(k<5);
下面能正确计算1*2*3*•••*10的程序段是()A.do{ k=1;n=1;n=n*k;k++; }while(k<=10);B.do{ k=1;n=0;n=n*k;k++; }while(k<=10);C.k=1;n=1; do{ n=n*k;k++; }while(k<=10);D.k=1;n=0; do{ n=n*k;k++; }while(k<=10);
以下能够实现计算5!的程序段是()A.int fac=1,k=0; do{ k++; fac*=k;} while(k<5);B.int fac=0,k=1; do{ fac*=k; k++;} while(k<5);C.int fac=1,k=1; do{ k++; fac*=k;} while(k<=5);D.int fac=1,k=0; do{ fac*=k; k++;} while(k<5);
1、以下能够实现计算5!的程序段是()A.int fac=1,k=0; do{ k++; fac*=k;} while(k<5);B.int fac=0,k=1; do{ fac*=k; k++;} while(k<5);C.int fac=1,k=1; do{ k++; fac*=k;} while(k<=5);D.int fac=1,k=0; do{ fac*=k; k++;} while(k<5);
【填空题】当运行以下程序时,从键盘输入1 2 3 4 5 -1<CR>,则下面程序的运行结果是 。 #include<stdio.h> main() {int k=0,n; do{scanf("%d",n);k+=n;}while(n!=-1); printf("k=%d n=%dn",k,n); }