更多"下列程序的功能是统计所有的“水仙花数”的个数,请填空。(“水仙花数”是"的相关试题:
[填空题]下列程序的功能是统计所有的“水仙花数”的个数,请填空。(“水仙花数”是指一个3位数,其各位数字立方和等于该数本身,例如,153=13+53+33)。
(9)
FOR n=100 TO 999
n1=VAL(SUBS(STR(n,3),3,1))
n2=VAL(SUBS(STR(n,3),2,1))
n3=VAL(SUBS(STR(n,3),1,1))
IF (10)
nCount=nCount+1
ENDIF
ENDFOR
WAIT WINDOWS’"水仙花数"的个数为’+ (11)
[简答题]编写程序打印出所有的“水仙花数”,所谓“水仙花数”是指一个三位数,其各位数字立方和等于该数本身。
[填空题]下面程序的功能是:求出所有的三位数,其各位数字的立方和等于该数。如: 153=13+53+33。
Option Explicit
Private Sub Form_Click( )
Dim x1 As Integer,x2 As Integer,x3 As Integer
【9】
For i=100 To 999
x=i
x1= 【10】 个位数字
x2=x/10 Mod 10
x3=x/100
If 【11】 Then
Print i
End If
Next i
End Sub
[单项选择]教育培训统计工作的基本程序包括统计设计、统计调查、( )和统计分析。
A. 统计资料的准备
B. 信息整合
C. 统计资料的整理
D. 统计信息的确认
[单项选择]下面程序的功能是统计字符串中“array”的个数,在程序的空白处应填入的正确选项是
public class FindKeyWords
public static void main(String[]args)
String text="An array is a data structur that stores a collection of"
+"values of the same type. You access each indMdual value"
+"through an integer index. For example,if a is an array"
+"of inergers,then a[i]is the ith integer in the array.";
int arrayCount=0;
int index=-1;
String arrayStr="array";
index=text.indexOf(arrayStr);
while(index>=0)
++arrayCount;
index+=arrayStr.length( );
index=text.indexOf(arrayStr,index);
System.out.println("the text contains"+arrayCount+"arrays");
A. <
B. =
C. <=
D. >=
[多项选择]统计资料的公布程序包括统计资料的()。
A. 审核程序
B. 核定程序
C. 签署程序
D. 审批程序
E. 备案程序
[单项选择]下列程序的功能是统计字符串中“array”的个数,在程序的空白处应填入的正确选项是______。
public class FindKeyWords
public static void main(sring[]args)
sting text=
"An array is a data structur that stores a collection of"
+"values of the same type. You access each individual value"
+"through an integer index. For example, if a is an array"
+"of inergers, then a[i] is the ith integer in the array.";
Int arrayCount=0;
Int idex=-1;
Sting arrarStr="array";
Index=text. indexof(arrayStr);
While(index______0)
++arrayCount;
Index+=arrayStr. length( );
Index=text. indexof(arrayStr,index);
System. out. println
("the text contains"+arrayCount+"arrays");
A. <
B. =
C. <=
D. >=
[判断题]统计资料的公布程序包括统计资料的核定和备案两部分。
[填空题]以下程序的功能是在立即窗口中输出100~200之间所有的素数,并统计输出素数的个数,请在程序空白处填入适当的语句,使程序可以完成指定的功能。
Private Sub Command2_Click( )
Dim i%,j%,k%,t% ’t为统计素数的个数
Dim b AS Boolean
For i=100 To 200
b=True
k=2
j=Int(Sqr(i))
Do while k<=j And b
If i Mod k=0 Then
b=______
End If
k=______
Loop
If b=True Then
t=t+1
Debug.Print i
End If
Next i
Debug.Print’t=’;t
End Sub
[填空题]下面程序的功能是产生10个小于100(不含100) 的随机正整数,并统计其中5的倍数所占比例,但程序不完整,请补充完整。
Sub PR( )
Randomize
Dim a(10)
For i=1 To 10
a(i) =Int( [14] )
If [15] Then k=k+1
Print a(j)
Next j
Print
Print k/10
End Sub
[填空题]
下面程序的功能是产生10个小于100(不含100)的随机正整数,并统计其中5的倍数所占比例,但程序不完整,请补充完整。
SubPR( )
Randomize
Dim a(10)
For j=1 To 10
a(i)=Int( (14)
)
If (15) Then k=k+1
Print a(j)
Next j
Print
Print k/10
Fnd Sub