更多"以下由C语言编写的程序,运行后输出结果是______。 #inclu"的相关试题:
[填空题]以下由C语言编写的程序,运行后输出结果是______。
#include<stdio.h>
void fun(int x)
if(x/2>1)fun(x/2);
Printf(“%d”,x);
Main( )
fun(7);printf(“/n”);
[填空题]在窗体上画一个命令按钮,然后编写如下事件过程,程序运行后,单击命令按钮,输出结果是 【15】
Private Sub Command1_Click( )
Dim a(1 To 10)
Dim p(1 To 3)
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
[单项选择]下面程序运行后,单击命令按钮,输出的结果是
Private Sub Command1_Click( )
Dim a%(1 To 4) , b%(2 To 6) , i%, str1#, str2#
For i = 1 To 4
a(i) =i
Next
For i = 2 To 6
b(i) =i
Next
str 1 = YAG (
[填空题]下面程序运行后,单击命令按钮,输出的结果是 【12】
Private Sub Command1_Click( )
Dim a%(1 To 4),b%(2 To 6),i%,str1#,str2#
For i=1 To 4
a(i)=i
Next
For i=2 To 6
b(i) =i
Next
str1 = YAG(a)
str2 = YAG(b)
Print "str1 ="; str1; "str2 ="; str2
End Sub
Function YAG (a ( ) As Integer)
Dim t#, i%
t=1
For i = LBound(a) To UBound(a)
t=t * a(i)
Next
YAG = t
End Function
[填空题]下面程序运行后,单击命令按钮,输出的结果是【 】。
Private Sub Commandl_Click( )
Dim a%(1 To 4) ,b%(2 To 6) ,i%,strl#,str2#
For i=1 To 4
a(i) =i
Next i
For i=2 To 6
b(i) =i
Next i
str1 =YAG(a)
str2 =YAG(b)
Print"strl";str1;"str2=";str2
End Sub
Function YAG (a( )As Integer)
Dim T#,i%
t=1
For i=LBound(a) To UBound(a)
t=t * a(i)
Next i
YAG =t
End Function
[填空题]下面程序运行后,单击命令按钮,输出的结果是 (10) 。
Private Sub Command1_Click( )
Dim a%(1 To 5),1%,s#
For i=1 To 5
a(i)=i
Next
s=Fun(A)
Print“s=”;s;
End Sub
Function Fun(a( ) As Integer)
Dim t#,i%
t=1
For i=LBound(A) To UBound(A)
t=t*a(i)
Next
Fun=t
End Function
[填空题]下面程序运行后,单击命令按钮,输出的结果是 【8】
Private Sub Commandl_Click( )
Dim a%(1 To 4) ,b%(2 To 6) ,i%,strl#,str2#
For i=1 To 4
a(i) =i
Next i
For i=2 To 6
b(i) =i
Next i
str1 =YAG(a)
str2 =YAG(b)
Print"strl";str1;"str2=";str2
End Sub
Function YAG (a( )As Integer)
Dim T#,i%
t=1
For i=LBound(a) To UBound(a)
t=t * a(i)
Next i
YAG =t
End Function
[填空题]以下程序运行后输出结果是 【8】 。
#include
main( )
{ int i, j;
for(i=6;i>3;i--) j=i;
printf("%d%d/n",i,j);
}