answersLogoWhite

0


Best Answer

Private Sub Check_Click()

Dim d As Integer

Dim num As Integer

Dim s As Integer

Dim old As Integer

num = Val(Text1.Text)

old = num

s = 0

While num > 0

d = num Mod 10

s = s + (d * d * d)

num = num \ 10

Wend

If old = s Then

Label1.Caption = "Armstrong"

Else

Label1.Caption = "Not armstrong"

End If

End Sub

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a VB program in to find number is Armstrong or not?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write a Shell program to find the smallest number from a set of numbers?

k


How do you write a java program to find the square root of a number?

You can use the Math.sqrt() method.


Write a Shell program to find the sum of cube of individual digits of a number?

no thanks


Write a c program to find given number is prime or not?

Yes, do write, or if you're too lazy to your homework, use google.


What is the largest prime no that is stored in 8 bit pattern?

Write your own prime number program and find out.


Writes a c program to find the sum of all integers between 1 and n?

Write a program to find the number and sum of all integers from 100 to 300 that are divisible by 11


How do you write Square program using vb?

write a vb program to find the magic square


How do you write socket program in c?

For first find an example program.


Write a program to find the grade obtained by the students of a class using structure?

Write a program to find the grade obtained by the students of a class


Write a c program to find eigenvalue of a matrix?

Yes, do write. That's what you always have to do when you have got a homework-program.


Write a C program called MonthDays to find the number of days in a given month Test your code with different input values to demonstrate that your function is robust?

Write a C program called MonthDays to find the number of days in a given month Test your code with different input values to demonstrate that your function is robust?


How to write A Java program to print number of digits in a given number?

One way to do this is to convert the number to a String, then use the corresponding String method to find out the length of the String.