VB中Picture1.cls
PrivateSubcommand1_click()DimiAsIntegerDimaAsDouble,bAsDouble,tnAsDouble,anAsDoublepi...
Private Sub command1_click() Dim i As Integer Dim a As Double, b As Double, tn As Double, an As Double picture1.Cls (提示这有问题) i = 1: tn = 0: sn = 0 a = Val(Text1.Text) b = a If Val(Text1.Text) > 0 And Val(Text1.Text) < 10 And Val(Text2.Text) > 2 Then Do While (i <= CInt(Text2.Text)) tn = tn + a sn = sn + tn a = a * 10 i = i + 1 Loop Else MsgBox "请输入10以内的自然数!", vbOKOnly + vbInformation, "数据错误" End If picture1.Print b & "+" & b & b & "+ ..." & "+"; tn & " = "; sn End Sub Private Sub Form_Load() End Sub
展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询