编写程序找出乘积为399的两个相邻奇数.就是一般高中数学的语言.应该是最简单的那种.
2019-04-04
编写程序找出乘积为399的两个相邻奇数.就是一般高中数学的语言.应该是最简单的那种.
优质解答
Dim a As Long
Dim b As Long
Private Sub Command1_Click()
a = 1
b = 1
Do While b < 399
a = a + 2
b = a + 2
If a * b = 399 Then
Print a, b
End If
Loop
End Sub
Dim a As Long
Dim b As Long
Private Sub Command1_Click()
a = 1
b = 1
Do While b < 399
a = a + 2
b = a + 2
If a * b = 399 Then
Print a, b
End If
Loop
End Sub