有过程如下:Sub fact (m As Integer, total As Long) Dim i As Integer total = 1 for i = 1 To m total = total*i Next iEnd Sub调用它的事件过程如下:Private Sub Command1_ Click () Dim tot As Long Dim a As Integer a = Val InputBox (“请输入数据”)) Call fact (a, tot) Print totEnd Sub则输入数据5,运行结果为 ______。A.100B.120C.200D.50

有过程如下:Sub fact (m As Integer, total As Long) Dim i As Integer total = 1 for i = 1 To m total = total*i Next iEnd Sub调用它的事件过程如下:Private Sub Command1_ Click () Dim tot As Long Dim a As Integer a = Val InputBox (“请输入数据”)) Call fact (a, tot) Print totEnd Sub则输入数据5,运行结果为 ______。

A.100

B.120

C.200

D.50


相关考题:

有如下函致: Function fact(x As Integer)As Long Dim p As Long,i As Integer p=1 For i=1 To x p=p*1 Next fact=p End Function 调用它的事件过程如下: Private Sub Command1_Click() i=Val(Inputbox("请输入数据")) a=fact((i)) Print a End Sub 若输入数据5,则运行结果为A.120B.60C.80D.100

有以下程序 main() { int m[][3]={1,4,7,2,5,8,3,6,9}; int i,j,k=1 for(i=0;i<3;i++) { printf("%d",m[k][i]); } }执行后输出结果是______。A.4 5 6B.2 5 8C.3 6 9D.7 8 9

E.堆排序:procedure sift(i,m:integer);{调整以i为根的子树成为堆,m为结点总数}var k:integer;

以下代码的运行结果为:public class Calc {public static void main (String args []) {int total = 0;for (int i = 0, j = 10; total >30; ++i, --j) {System.out.println(" i = " + i + " : j = " + j);total += (i + j);}System.out.println("Total " + total);}}A. 产生运行错误B. 产生编译错误C. 输出 "Total 0"D. 产生如下输出:i = 0 : j = 10i = 1 : j = 9i = 2 : j = 8Total 30

86、在平时成绩记录器中,下列代码运行后,Total的意义是 ToTal = 0:i = 5:flat = 1 While flat If Cells(i, 1) <> "" And Cells(i, 2) <> "" Then ToTal = ToTal + 1 i = i + 1 Else flat = 0 End If WendA.学生人数B.作业次数C.至少交过一次作业的学生人数D.以上都不对

若要实现total=1+2+3+4+5求和,以下程序段错误的是()A.int i=1,total=1; while(i<5) { total+=i; i+=1; }B.int i=1,total=0; while(i<=5) { total+=i; i+=1; }C.int i=0,total=0; while(i<5) { i+=1; total+=i; }D.int i=0,total=0; while(i<=5) { total+=i; i+=1; }

34、若要实现total=1+2+3+4+5求和,以下程序段错误的是()A.int i=1,total=1; while(i<5) { total+=i; i+=1; }B.int i=1,total=0; while(i<=5) { total+=i; i+=1; }C.int i=0,total=0; while(i<5) { i+=1; total+=i; }D.int i=0,total=0; while(i<=5) { total+=i; i+=1; }

下列程序的输出结果是 int total = 0; for (int i = 0; i < 4; i++ ){ total += i; if (i == 2) break; } System.out.println(total);A.1B.3C.5D.6

在平时成绩记录器中,下列代码运行后,Total的意义是 ToTal = 0:i = 5:flat = 1 While flat If Cells(i, 1) <> "" And Cells(i, 2) <> "" Then ToTal = ToTal + 1 i = i + 1 Else flat = 0 End If WendA.学生人数B.作业次数C.至少交过一次作业的学生人数D.以上都不对

有如下程序段: int total = 0; for (int i = 0; i < 4; i++ ){ if (i == 1) continue; if (i == 2) break; total += i; } 则执行完该程序段后total的值为:()A.0B.1C.3D.6