3 Replies - 650 Views - Last Post: 29 January 2008 - 11:00 PM Rate Topic: -----

#1 raja_clever  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 17
  • Joined: 12-January 08

vb

Post icon  Posted 25 January 2008 - 08:00 AM

command1_click()
dim n%,n1%,a%,a1%
n=val(inputbox("enter n:"))
n1=n
a1=0
while(n>0)
a=nmod10
a1=a1+a*a*a
n=int(n/10)
wend
if(n1=a1)
msgbox "amstrong n"
else
msgbox "not a amstrong no"
endif
endsub
/*use the same code for reversing a number with the modification as
a1=a1*10+a instead of a1+a*a*a\


Is This A Good Question/Topic? 0
  • +

Replies To: vb

#2 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • Posts: 13,506
  • Joined: 12-July 02

Re: vb

Posted 25 January 2008 - 08:06 AM

Moved to proper forum. Did you have a question relating to this code?
Was This Post Helpful? 0
  • +
  • -

#3 DataMan  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 02-November 07

Re: vb

Posted 26 January 2008 - 11:48 PM

Raja I am unsure of what you wish anyone to help you with but to * variable A by 10 without having to go a * a * a ... just do this "(a * 10) the computer will calculate the sum inside the brackets.
Dont know if thats what you wanted help with?
Was This Post Helpful? 0
  • +
  • -

#4 bector  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 8
  • Joined: 23-January 08

Re: vb

Posted 29 January 2008 - 11:00 PM

i have seen above code

but you are not specify any kind of help regarding above code

so please specify you question clearly other wise there is no use of any comment

thankx

for any type of web designing related information you can visit
*** link removed ***
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1