求自然数对数Private Sub Command1_Click()For x = 1 To 100For y = 1 To 100If x < y Then t = x:x = y:y = tIf x + y = (Sqr(x + y)) ^ 2 And x - y = (Sqr(x - y)) ^ 2 ThenList1.AddItem Format(x,"@@@@") & Format(y,"@@@@")End IfNextNextEnd Subx < y Then
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/17 21:16:21
求自然数对数Private Sub Command1_Click()For x = 1 To 100For y = 1 To 100If x < y Then t = x:x = y:y = tIf x + y = (Sqr(x + y)) ^ 2 And x - y = (Sqr(x - y)) ^ 2 ThenList1.AddItem Format(x,"@@@@") & Format(y,"@@@@")End IfNextNextEnd Subx < y Then
求自然数对数
Private Sub Command1_Click()
For x = 1 To 100
For y = 1 To 100
If x < y Then t = x:x = y:y = t
If x + y = (Sqr(x + y)) ^ 2 And x - y = (Sqr(x - y)) ^ 2 Then
List1.AddItem Format(x,"@@@@") & Format(y,"@@@@")
End If
Next
Next
End Sub
x < y Then t = x:x = y:y =
它的意思是不是 当X
求自然数对数Private Sub Command1_Click()For x = 1 To 100For y = 1 To 100If x < y Then t = x:x = y:y = tIf x + y = (Sqr(x + y)) ^ 2 And x - y = (Sqr(x - y)) ^ 2 ThenList1.AddItem Format(x,"@@@@") & Format(y,"@@@@")End IfNextNextEnd Subx < y Then
a瓶装酱油,b瓶装醋,现在想把b瓶装酱油,a瓶装醋.怎么办呢?
于是就有人想出一个方法:
拿一个空瓶(c瓶),dim c as integer
先把a瓶的酱油倒入c瓶,c=a
又把b瓶的醋倒入a瓶,a=b
再把c瓶的酱油倒入b瓶.b=c