answersLogoWhite

0


Best Answer

class Armstrong{ public static void main(String args[]) { int num,rem,qub,sum=0,i; for(i=0; i<=999; i++) { num=i; sum=0; while(num>0) { rem=num%10; qub=rem*rem*rem; sum=sum+qub; num=num/10; } if(sum==i) { System.out.println("Print 1 to 1000 Armstrong Number",sum); } } } }

User Avatar

Wiki User

11y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

11y ago

Private Sub Button1_Click(ByVal sender As System.Object,

ByVal

e As System.EventArgs)

Handles Button1.Click
Dim i, m, n, d As Integer
Dim s As Integer
For i =

1 To 1000
m =

i
n =

m
s =

0


While (n > 0)
d =

n Mod 10
s =

s + (d * d * d)
n =

n / 10

End While



Next
If s =

i Then

ListBox1.Items.Add(i)

End If



End Sub

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

Cls

input "enter a number"; n

s = n

while n <> 0

a = n mod 10

r = r + a ^ 3

n = fix(n / 10)

wend

if s = r then

print "the given number is armstrong"

else

print "it is not armstrong"

end if

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

simple Armstrong number

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a program in vbnet to find Armstrong numbers between 1 and 100?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you write a VBnet program to find the prime numbers between 100 to 200?

VBnet program to find the prime numbers between 100 to 200?


Q2 Write a program to print even numbers between 10 and 50?

You can use int i; for (i = 10; i &lt;= 50; i += 2) {//print i} as a program to print even numbers between 10 and 50.


What are all the whole numbers between 1 to 1000000000?

All of the whole numbers between one and a billion. Honestly, we're not robots here. Write a program and do it yourself, if you really need them.


Write a program in Lex to eliminate white space and collect numbers as a token?

write a lex program to delete space from the program


How do you write an assembly language program to find the sum of n numbers using array?

write an assembly language program to find sum of N numbers


Shell program for gcd of three given numbers?

write a shell program for finding out gcd of three given numbers? write a shell program for finding out gcd of three given numbers? write a shell program for finding out gcd of three given numbers? check bellow link http://bashscript.blogspot.com/2009/08/gcd-of-more-than-two-numbers.html


How do you write a program in objective c numbers 1-100 prime numbers?

fdsgfhgdfhgdf


Could you Write a program for 8086 microprocessor that displays on the monitor the average of 2 numbers from an array?

How to write a program for mouse in microprocessor?


Write a program to print even and odd numbers in between 1 to 10?

for (int i = 2; i < 10; i ++) printf("%d\n", i); You did say even and odd numbers between 1 and 10. That's allnumbers between 1 and 10.


How to write a C program to find largest 2 numbers using pointers?

program to find maximum of two numbers using pointers


Write a Program in c to find palindrome numbers between any two numbers?

please somebody should help me answer this question..I have a project on it even! It seems almost impossible at the moment.


Write a program to add two 8 bit numbers in microprocessor 8051?

write it in 8085