这题可难倒我了,求助大佬
vb吧
全部回复
仅看楼主
level 5
2023年10月08日 02点10分 1
level 5
text的字号和对齐我已设置好了,就是不知道command1~3怎么写代码让他出现随机数已经开平方
2023年10月08日 02点10分 2
不是已经,是以及。打错字了[汗]
2023年10月08日 02点10分
level 5
Private Sub Command1_Click()
Randomize
Text1.Text = Int(Rnd * 9999) + 1
End Sub
Private Sub Command2_Click()
If IsNumeric(Text1.Text) = True Then
Text2.Text = Sqr(Text1.Text)
End If
End Sub
Private Sub Command3_Click()
If IsNumeric(Text2.Text) = True Then
Text3.Text = Round(Text2.Text, 2)
End If
End Sub
2023年10月08日 03点10分 3
有误,见下图
2023年10月08日 04点10分
@tbzp666 看不到图片,虽然是手写的,但我没看到错误
2023年10月08日 04点10分
@hoyogoo 随机四位数
2023年10月08日 04点10分
嗯,没注意,应该是9000+1000
2023年10月08日 04点10分
level 8
Private Sub Command1_Click()
Randomize
Text1.Text = Int(Rnd *9000) + 1000
End Sub
Private Sub Command4_Click()
text1.text="":text2.text="": text3.text=""
text1.SetFocus
End Sub
2023年10月08日 04点10分 4
1