早教吧 育儿知识 作业答案 考试题库 百科 知识分享

关于VB算法分解316PrivateSubCommand1Click()DimiAsIntegerDimxAsIntegerFori=11To316Step11x=316+i'此行有1个错误Ifx/13=0Then'此行有1个错误Label1.Caption=Label1.Caption&i&""&x&Chr(10)&Chr(13)End

题目详情
关于VB 算法 分解316
Private Sub Command1_Click()
Dim i As Integer
Dim x As Integer
For i = 11 To 316 Step 11
x = 316 + i '此行有1个错误
If x / 13 = 0 Then '此行有1个错误
Label1.Caption = Label1.Caption & i & " " & x & Chr(10) & Chr(13)
End if
Next
End Sub
Private Sub Command2_Click()
End
End Sub
将316分解成两个正整数只和 一个被11整除 一个被13整除 并写出满足此条件的所有解.
▼优质解答
答案和解析
Private Sub Command1_Click()
Dim i As Integer
Dim x As Integer
For i = 11 To 316 Step 11
x = 316 - i '此行有1个错误
If x mod 13 = 0 Then '此行有1个错误
Label1.Caption = Label1.Caption & i & " " & x & Chr(10) & Chr(13)
End if
Next
End Sub
Private Sub Command2_Click()
End
End Sub