Armstrong Number Code :-
Design Form like that :-
And write down that code :-
Private Sub Command1_Click()
Dim i, x, r, n As Integer
n = InputBox("enter the numnber")
x = n
i = 0
While (x > 0)
r = x Mod 10
i = i + r * r * r
x = Int(x / 10)
Wend
If n = i Then
Print "Armstrong"
Else
Print "not armstrong"
End If
End Sub
thanks for this information....and thanks for adding the design screen
ReplyDeleteThis is awesome eyy.Thanks for the code
ReplyDeleteNice codding.....help me to get understand easily.
ReplyDeleteNice information
ReplyDeletethank you
ReplyDeleteThis is not a proper code for armsArmst number. First we have to count the lenth of the number then power this count variable to each of the digit of the given number.
ReplyDeleteThank you
ReplyDelete