随堂测试1
班级姓名学号成绩
完成程序填空
Dim a as integer
Dim b as integer
Dim c as integer
Dim x As Integer
Private mand1_Click()
x = InputBox("Input a")
b=int(x/100)
c =( a-100*b-x) /10
x=a mod 10
If b^3+c^3+x^3=a Then
Print ("这是水仙花数")
Else
Print ("这不是水仙花数")
End If
End Sub
寻找一千以内的素数,画流程图
For i =100 to 999
Flag=0
For j=2 to sqr(i)
If i mod j =0 then
Flag=1
End if
Next j
If flag=0 then
Print i
End if
Next i
随堂测试1 来自淘豆网m.daumloan.com转载请标明出处.