下列语句中哪条是错误的()? A: WRITE(*,*)(I,A(I),I=1,N) B: WRITE(*,*)(N,A(I),I=1,N) C: READ(*,*)N,(A(I),I=1,N) D: READ(*,*)(N,A(I),I=1,N)
下列语句中哪条是错误的()? A: WRITE(*,*)(I,A(I),I=1,N) B: WRITE(*,*)(N,A(I),I=1,N) C: READ(*,*)N,(A(I),I=1,N) D: READ(*,*)(N,A(I),I=1,N)
若有数组Dim a%(10)且每个元素有值,统计前一个元素大于后一个元素的次数,结果存放在变量n中。则下列语句正确的是___________。 A: Dim i%, n% For i = 1 To 10 If a(i) > a(i + 1) Then n = n + 1 End If Next MsgBox(n) B: Dim i%, n% For i = 1 To 10 If a(i) > a(i + 1) Then n = a(i) End If Next MsgBox(n) C: Dim i%, n% For i = 0 To 9 If a(i) > a(i + 1) Then a(i) = n + 1 End If Next MsgBox(n) D: Dim i%, n% For i = 0 To 9 If a(i) > a(i + 1) Then n = n +1 End If Next MsgBox(n)
若有数组Dim a%(10)且每个元素有值,统计前一个元素大于后一个元素的次数,结果存放在变量n中。则下列语句正确的是___________。 A: Dim i%, n% For i = 1 To 10 If a(i) > a(i + 1) Then n = n + 1 End If Next MsgBox(n) B: Dim i%, n% For i = 1 To 10 If a(i) > a(i + 1) Then n = a(i) End If Next MsgBox(n) C: Dim i%, n% For i = 0 To 9 If a(i) > a(i + 1) Then a(i) = n + 1 End If Next MsgBox(n) D: Dim i%, n% For i = 0 To 9 If a(i) > a(i + 1) Then n = n +1 End If Next MsgBox(n)
i<=n;i++) for(i=1;i<=n;i--)f*=i; f*=i;C.f=1; D.f=1;for(i=n;i>1;i++) for(i=n;i>=2;i--)f*=i; f*=i;
i<=n;i++) for(i=1;i<=n;i--)f*=i; f*=i;C.f=1; D.f=1;for(i=n;i>1;i++) for(i=n;i>=2;i--)f*=i; f*=i;
下列程序段能分别正确显示1!、2!、3!、4!的值的是______。 A: For i = 1 To 4 n = 1 For j = 1 To i n = n * j MsgBox(n) Next jNext i B: For i = 1 To 4 For j = 1 To i n = 1 n = n * j Next j MsgBox(n)Next i C: n = 1For i = 1 To 4 For j = 1 To 4 n = n * j MsgBox(n) Next jNext i D: n = 1j = 1Do While j <= 4 n = n * j MsgBox(n) j = j + 1Loop
下列程序段能分别正确显示1!、2!、3!、4!的值的是______。 A: For i = 1 To 4 n = 1 For j = 1 To i n = n * j MsgBox(n) Next jNext i B: For i = 1 To 4 For j = 1 To i n = 1 n = n * j Next j MsgBox(n)Next i C: n = 1For i = 1 To 4 For j = 1 To 4 n = n * j MsgBox(n) Next jNext i D: n = 1j = 1Do While j <= 4 n = n * j MsgBox(n) j = j + 1Loop
下列程序段能且只能显示1!、2!、3!、4!的值的是( )。 A: For i = 1 To 4 n = 1 For j = 1 To i n = n * j Next j MsgBox(n)Next i B: For i = 1 To 4 For j = 1 To i n = 1 n = n * j Next j MsgBox(n)Next i C: n = 1For i = 1 To 4 For j = 1 To 4 n = n * j MsgBox(n) Next jNext i D: n = 1j = 1Do While j <= 4 n = n * j j = j + 1LoopMsgBox(n)
下列程序段能且只能显示1!、2!、3!、4!的值的是( )。 A: For i = 1 To 4 n = 1 For j = 1 To i n = n * j Next j MsgBox(n)Next i B: For i = 1 To 4 For j = 1 To i n = 1 n = n * j Next j MsgBox(n)Next i C: n = 1For i = 1 To 4 For j = 1 To 4 n = n * j MsgBox(n) Next jNext i D: n = 1j = 1Do While j <= 4 n = n * j j = j + 1LoopMsgBox(n)
下面____程序段不能正确显示1!、2!、3!、4!的值。 A: For I=1 To 4 n=1 For j=1 to I n=n*j Next j Print n Next I B: For I=1 To 4 For j=1 to I n=1 n=n*j Next j Print n Next I C: n=1 For j=1 to 4 n=n*j Print n Next j D: n=1:j=1 Do While j<=4 n=n*j Print n j=j+1Loop
下面____程序段不能正确显示1!、2!、3!、4!的值。 A: For I=1 To 4 n=1 For j=1 to I n=n*j Next j Print n Next I B: For I=1 To 4 For j=1 to I n=1 n=n*j Next j Print n Next I C: n=1 For j=1 to 4 n=n*j Print n Next j D: n=1:j=1 Do While j<=4 n=n*j Print n j=j+1Loop
【单选题】设变量已正确定义,则以下能正确计算f=n!的程序段是_。 (A) f=0; (B)f=1; for(i=l;i<=n;i++) f*=i; for(i=1;i (C)f=l; (D) f=1; for(i=n;i>1;i++ ) f *=i; for(i=n;i> = 2ji--) f *=i; A. f=0; for(i=l;i<=n;i++) f*=i; B. f=1; for(i=1;i C. f=1; for(i=n;i>1;i++ ) f *=i; D. f=1; for(i=n;i>= 2;i--) f *=i;
【单选题】设变量已正确定义,则以下能正确计算f=n!的程序段是_。 (A) f=0; (B)f=1; for(i=l;i<=n;i++) f*=i; for(i=1;i (C)f=l; (D) f=1; for(i=n;i>1;i++ ) f *=i; for(i=n;i> = 2ji--) f *=i; A. f=0; for(i=l;i<=n;i++) f*=i; B. f=1; for(i=1;i C. f=1; for(i=n;i>1;i++ ) f *=i; D. f=1; for(i=n;i>= 2;i--) f *=i;
设变量已正确定义,则以下能正确计算n!的程序段是 。 A: f=0; for(i=1; i<;=n; i++)f*=i; B: f=1; for(i=1; i<;n; i++)f*=i; C: f=1; for(i=n; i>;1; i++)f*=i; D: f=1; for(i=n; i>;=2; i--)f*=i;
设变量已正确定义,则以下能正确计算n!的程序段是 。 A: f=0; for(i=1; i<;=n; i++)f*=i; B: f=1; for(i=1; i<;n; i++)f*=i; C: f=1; for(i=n; i>;1; i++)f*=i; D: f=1; for(i=n; i>;=2; i--)f*=i;
假设整型n已输入值。以下不能正确计算1*2*3*...*n的程序段是_______。 (1) for(i=1,s=1; i<=n; i++) s*=i; (2) i=1;s=1; while(i<=n) s*=i++; (3) i=0,s=1; do{ i++,s*=i; }while(i<=n); (4) for(i=1,s=1; ; i++) { s = s*i, if(i==n) break; }
假设整型n已输入值。以下不能正确计算1*2*3*...*n的程序段是_______。 (1) for(i=1,s=1; i<=n; i++) s*=i; (2) i=1;s=1; while(i<=n) s*=i++; (3) i=0,s=1; do{ i++,s*=i; }while(i<=n); (4) for(i=1,s=1; ; i++) { s = s*i, if(i==n) break; }
以下关于现值系数和终值系数说法正确的是( ) A: 0<(P/F,i,n)<1 0<(F/P,i,n)<1 B: (P/F,i,n)>1 (F/P,i,n)>1 C: 0<(P/F,i,n)<1 (F/P,i,n)>1 D: 0<(F/P,i,n)<1 (P/F,i,n)>1
以下关于现值系数和终值系数说法正确的是( ) A: 0<(P/F,i,n)<1 0<(F/P,i,n)<1 B: (P/F,i,n)>1 (F/P,i,n)>1 C: 0<(P/F,i,n)<1 (F/P,i,n)>1 D: 0<(F/P,i,n)<1 (P/F,i,n)>1