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); } } } }
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
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
simple Armstrong number
write a lex program to delete space from the program
How to write a program for mouse in microprocessor?
To write a C++ program to display the student details using class and array of object.
Q.1 Write a program to print first ten odd natural numbers. Q.2 Write a program to input a number. Print their table. Q.3 Write a function to print a factorial value.
how to write a program that counts automorphic number from 1 to 999
VBnet program to find the prime numbers between 100 to 200?
You can use int i; for (i = 10; i <= 50; i += 2) {//print i} as a program to print even numbers between 10 and 50.
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 lex program to delete space from the program
write an assembly language program to find sum of N 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
fdsgfhgdfhgdf
How to write a program for mouse in microprocessor?
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.
program to find maximum of two numbers using pointers
please somebody should help me answer this question..I have a project on it even! It seems almost impossible at the moment.
write it in 8085