Tuesday 10 April 2012

To find Armstrong Number


n=InputBox("enter the value")
For x=1 to n
For i=1 to len(x)
c=mid(x,i,1)
s=s+c^3
Next
If s=x Then
print "Armstrong Numbers are:  "&s
End If

s=empty
Next

No comments:

Post a Comment