问几道VB的题目!6\x05"求方程8x-5y=3,在|x|

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/21 23:34:22
问几道VB的题目!6\x05"求方程8x-5y=3,在|x|问几道VB的题目!6\x05"求方程8x-5y=3,在|x|问几道VB的题目!6\x05"求方程8x-5y=3,在|x|PrivateSub

问几道VB的题目!6\x05"求方程8x-5y=3,在|x|
问几道VB的题目!
6\x05"
求方程8x-5y=3,在|x|

问几道VB的题目!6\x05"求方程8x-5y=3,在|x|
Private Sub Form_Click()
Dim x,y,z As Integer
For x = -150 To 150
For y = -100 To 100
If 8 * x - 5 * y = 3 Then
z = z + 1
End If
Next
Next
Print "答案共有"; z; "组"
End Sub
------------------
Private Sub Form_Click()
Dim i,j,k,l,m,n,Z As Long
For i = 1 To 9
For j = 0 To 9
For k = 0 To 9
For l = 0 To 9
For m = 0 To 9
If i * i + j * j + k * k + l * l + m * m = 110 Then
n = i * 10000 + j * 1000 + k * 100 + l * 10 + m
If n > Z Then
Z = n
End If
End If
Next
Next
Next
Next
Next
Print "最大的五位数是:"; Z
End Sub