题目
分,共12分.) 一个自然数倒过来读仍是这个数,就叫回文数,有些回文数还是素数,就叫回文式素数,如9323
Function hw(m As Long) As Boolean
Dim a As Integer,b As Integer,c As Integer,d As Integer
a = Left(m,1):b = Mid(m,2,1)
c = _____________________
d = _____________________
hw = IIf(a = d And b = c,True,False)
End Function
Function ss(m As Long) As Boolean
Dim k As Long,i As Long,f As Boolean
f=True
k = Sqr(m)
For i = 2 To k
If _____________________ Then
f = False
Exit For
End If
Next i
________________
End Function
Private Sub Command1_Click()
Dim m As Long,n As Integer
For m = 10000 To 99999
If _____________________________ Then
Print Tab((n Mod 10) * 8 + 1); m;
n = n + 1
End If
Next m
End Sub
Mid(m,4,1) Right(m,1) 注意:只要能取出第四、五位即可得分
m mod i=0(只要能判断整除即可)
ss=f ss(m) hw(m)(只写ss及hw不得分,如果写了True但写错了扣1分)
Function hw(m As Long) As Boolean
Dim a As Integer,b As Integer,c As Integer,d As Integer
a = Left(m,1):b = Mid(m,2,1)
c = _____________________
d = _____________________
hw = IIf(a = d And b = c,True,False)
End Function
Function ss(m As Long) As Boolean
Dim k As Long,i As Long,f As Boolean
f=True
k = Sqr(m)
For i = 2 To k
If _____________________ Then
f = False
Exit For
End If
Next i
________________
End Function
Private Sub Command1_Click()
Dim m As Long,n As Integer
For m = 10000 To 99999
If _____________________________ Then
Print Tab((n Mod 10) * 8 + 1); m;
n = n + 1
End If
Next m
End Sub
Mid(m,4,1) Right(m,1) 注意:只要能取出第四、五位即可得分
m mod i=0(只要能判断整除即可)
ss=f ss(m) hw(m)(只写ss及hw不得分,如果写了True但写错了扣1分)
提问时间:2020-08-07
答案
问题补充:Function hw(m As Long) As BooleanDim a As Integer,b As Integer,c As Integer,d As Integera = Left(m,1):b = Mid(m,2,1)c = mid(m,4,1)d = right(m,1)hw = IIf(a = d And b = c,True,False)End Functi...
举一反三
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
奥巴马演讲不用看稿子.为什么中国领导演讲要看?
想找英语初三上学期的首字母填空练习……
英语翻译
1,人们染上烟瘾,最终因吸烟使自己丧命.
最新试题
- 1AB两人分别从相聚20千米的甲乙丙地相向而行,两小时后两人在途中相遇之后,A就返回甲地,B仍向甲地前进,A回到甲地时B离甲地还有2千米求AB两人的速度
- 2已知a.b.c的倒数成等差数列,若a.b.c互不相等,则c(a-b)/a(b-c)=
- 3用鸟字旁组成的动物名称
- 4未来的海洋作文,要自己写的,450字,十分钟内,快
- 5周杰伦成功的经历让你想起了哪句名言谚语或故事
- 6根据意思填上带有动字的词语.
- 7地球及其他一切天体都是由?组成的.?处于不停的运动和发展中 地球及其他一切
- 8“山河破碎风飘絮,身世浮沉雨打萍”是什么意思
- 9问几个角速度换算的问题
- 101.汉代皇帝“六尚”中的尚书与九卿中少府的属官尚书有何不同?2.汉代御史中丞的职权是什么?和六尚的关系是什么?3.汉代丞相下属的十三曹与九卿的关系是什么?
热门考点
- 1grey hair的意思是什么
- 2已知圆C与圆x^2+y^2-2x=0相外切,并且与直线x+根下3y=0相切于点Q(-3,根3),求圆C的方程
- 3Do you know the boy in the room?如何翻译?
- 4四年级《泉城》中填空?这道题网上有很多却找不到答案.怎么填呢?
- 5如果关于x的一元二次方程a(1+x^)+2bx-c(1-x^)=0有两个相等的实数根,那么以a,b,c为边的三角形ABC是什么形
- 6一丈等于几尺?
- 7翻译;现在网购越来越受到人们的欢迎,你可以买到任何你想要的东西
- 8选出点数分别为1和5的扑克各两张,反扣在桌面上,每次摸两张,然后放回去,另一个人再摸.如果让两个人玩,请你
- 9the people are waiting for the doctor -------(come ,coming,to come,is come)
- 10什么时候老师离开的?他是十分钟前离开的.用英语怎么说