首页
题目
TAGS
首页
/
题库
/
[单选题]有如下程序段: Dim I As Int的答案
搜答案
有如下程序段: Dim I As Integer I=Int(-3.25)执行后,I的返回值是
单选题
2022-01-01 08:40
A、-3
B、-4
C、3
D、3.25
查看答案
正确答案
B
试题解析
解析:Int 函数为取整函数,所以Int(-3.25) = -4。
标签:
感兴趣题目
下列程序段执行后,j值是()。for(int i(0), j(0); i<10; i++)if(i) j++;
以上程序段运行的结果是:______. Dim a(-1 To 5) As Boolean Dim flag As Boolean flag = False Dim i As Integer Dim j As Integer Do Until flag = True For i = -1 To 5 j=j+1 if a(i)= False Then a(i)= True Exit For End If If i = 5 Then flag = True End If Next Loop Print j
以下程序段运行的结果是______。 Dim a(-1 To 5)As Boolean Dim flag As Boolean flag=False Dim i As Integer Dim j As Integer Do Until flag=True For i=-1 To 5 j=j+l If a(i)=False Then a(i)=True Exit For End If If i=5 Then flag=True End If Next Loop Print j
以下程序段运行的结果是 ______。 Dim a(-1 To 5)As Boolean Dim flag As Boolean flag=False Dim i As Integer Dim j As Integer Do Until flag=True For i=-1 To 5 j=j+1 If a(i)=False Then a(i)=True Exit For End If If i=5 Then flag=True End If Next Loop Print j
有过程如下: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,运行结果为 ______。
以下程序执行后sum的值是()。 main(){ int i,sum; for(i=1;i<6;i++) sum+=i; printf("%d/n",sum); }
在窗体上画一个名称为Connand1的命令按钮,然后编写如下程序: Private Sub Command1_Click() Dim i As Integer, j As Integer Dim a(10, 10) As Integer For i = 1 To 3 For j = 1 To 3 a(i, j) = (i - 1) * 3 + j Print a(i, j); Next j Print Next i End Sub程序运行后,单击命令按钮,窗体上显示的是______。
在窗体上画一个名称为Commandl的命令按钮,然后编写如下程序: Private Sub Command1_Click() Dim i As Integer,j As Integer Dim a(10, 10)As Integer For i=1 To 3 For i=1 To 3 a(i,j)=(i-1) *3+j Print a(i,j); Next i Print Next i End Sub 程序运行后,单击命令按钮,窗体上显示的是
程序代码如下,当单击窗体上的Command1控件时,在窗体上输出的结果是( )。 Private Sub Command1_Click() Dim aa(3,3)As Integer Dim i As Integer,j As Integer Dim s As Integer For i=0 To 3 For j=0 To 3 aa(i,j)=i*4+j+1 Next j Next i For i=0 To 3 s=s+aa(i,1) Next i Print s End Sub
下列程序段执行后,j值是()。for(inti(0),j(0);i<10;i++)if(i)j++;
下面程序段输出的i值是() #include void main() {int i;for(i=1;i=130)&(i*i
设有如下程序: Private Sub Command1_Click() Dim a Dim I As Integer a=Array(1,2,3,4,5,6,7,8,9) For I=0 To 3 Print a(5-I); Next I End Sub 程序运行后,单击窗体,则在窗体上显示的是()
相关题目
以下程序执行后sum的值是 void main() { int i , sum; for(i=1;i<10;i++) sum+="i;">
设有以下的程序片段, int i;float f=105;i=((int)f)/2;请问执行后变量i的值是( )
下面的代码段执行之后count的值是什么( )int count = 1;for (int i = 1; i <= 5; i++) {count += i;}Systemoutprintln(count);
以下程序执行后sum的值是( )。 main { int i,sum; for(i=1;i<6;i++)sum+=i: printf("1%d\n",sum): }
以下程序执行后sum的值是 ( ) main( ) { int i,sum; for(i;i<6;i+ +)sum+=i; printf("%d ",sum); }
以下程序执行后Sum的值是(48)。main(){ int i,sum; for(i=1;i<6;i++)sum+=i; printf("%d ",sam);}
有如下程序,可以得到0到100之间所有偶数之和。 DIM I AS INTEGER DIM SUM AS INTEGER SUM = 0 FOR I =0 TO 100 STEP 2 SUM = SUM + I NEXT I DEBUG. PRINT I DEBUG. PRINT SUM 程序运行后,变量I和SUM的值是( )。
阅读下列程序: Private Sub Form Click() Dim i As Integer, sum As Integer For i = 2 To 10 If i Mod 2 <> 0 Then Print i; Else sum = sum + i End If Next i Print sum End Sub 程序运行后,单击窗体,在窗体上的输出结果是
有如下程序: Private Sub Form_Click() Dim i As Integer, Sum As Integer sum=0 For i=2 To 10 If i Mod 2<>0 And i Mod 3=0 Then sum=sum+i End If Next i Print sum End Sub 程序运行后,单击窗体,输出结果为______。
有如下程序: Private Sub Form_Click( ) Dim i As Integer, Sum As Integer Sum = 0 For i = 2 To 10 If i Mod 2=0 And i Mod 3<>0 Then Sum = Sum + i End If Next Print Sum End Sub 程序运行后,单击窗体,输出结果为
有如下程序: Private Sub Form_Click() Dim i As Integer,Sum As Integer Sum=0 For i=2 To 10 If i Mod 2<>0 And i Mod 3=0 Then Sum=Sum+i End If Next Print Sum End Sub 程序运行后,单击窗体,输出结果为
下列语句序列执行后,j的值是( )。 int j=0; for (int i=3 i>0; i- -)j+=i;
下面的代码段中,执行之后i和j的值是( )。 int i=1; int j; j=i++;
有如下程序段: Dim I As Integer I=Int(-3.25)执行后,I的返回值是
程序段如下: Dim i As Integer,s As Integer For i=4 To 1 Step-1 s=s+i Next i Print s,i执行的结果是( )。
针对下面程序段,边界值问题可以定位在___(62)___。1:Rem Create a 10 element integer array2:Rem lnitialize each element to -13:Dim data(10) As Integer4:Dim i As Integer5:For i=1 TO 106:data(i)=-17:Next i8:End(62)
单击一次命令按钮之后,下列程序段的执行结果为( )。 Pubic Sub Proc(a()As Integer) Static i As Integer Do a(i)=a(i)+a(i+1) i=i+1 Loop While i<2 End Sub Private Sub Command1_Click() Dim m As Integer,i As Integer,x(10)As Integer For i=0 To 4:x(i)=i+1:Next i For i=1 To 2:CallProc(x()):Next i For i=0 To 4:Print x(i);Next i End Sub
单击一次命令按钮之后,下更程序代码的执行结果为______ 。 Public Sub Proc(a() As Integer) Static i As Integer Do a(i) = a(i) + a(i + 1) i=i+1 Loop While i < 2 End Sub Private Sub Command1_Cliek() Dim m As Integer Dim i As Integer Dim x(10) As Integer For i = 0 To 4 x(i) = i + 1 Next i For i = 1 To 2 Call Proc (x) Next i For i = 0 To 4 Print x(i); Next i End Sub
在窗体上添加如下命令按纽,然后编写如下事件过程: Private Sub Command1_Click() Dim a(10)As Integer Dim p(3)As Integer k= 5 For i = 1 To 10 a(i) = i Next i For i = 1 To 3 p(i) = a(i * i) Next i For i = 1 To 3 k = k + p(i) * 2 Next i Print k End Sub该过程的运行结果为______。
程序执行完这条语句后int i=1,j=1;i<<2+j;i的值是多少?
广告位招租WX:84302438
题库考试答案搜索网
免费的网站请分享给朋友吧