编程!!!急!!!越快越好!!

2025-04-12 09:35:56
推荐回答(3个)
回答1:

Private Sub Command1_Click()
Dim n As Integer

For n = 1000 To 9999
If n = Left(n, 1) ^ 4 + Mid(n, 2, 1) ^ 4 + Mid(n, 3, 1) ^ 4 + Right(n, 1) ^ 4 Then
Print n
End If
Next

End Sub

回答2:

dim n as integer
dim gewei as integer

gewei=n mod 10

if gewei^4 = n then
print n & "是玫瑰数"
end if

回答3:

思路
dim a as Integer
dim b as Integer
dim c as Integer
dim d as Integer
dim i as Integer
for a = 1 to 9
for b = 0 to 9
for c = 0 to 9
for d = 0 to 9
if a^4+b^4+c^4+d^4=1000*a+100*b+10*c+d
i = 1000*a+100*b+10*c+d
return i
next
next
next
next