Computer Science, asked by Minho80, 5 months ago

Write a program in Java to print all the Armstrong numbers from 100 to 1000. ​

Answers

Answered by josnaelsajoseph
2

Answer:

public class Armstrong.

int n, count = 0, a, b, c, sum = 0;

System. out. print("Armstrong numbers from 1 to 1000:");

for(int i = 1; i <= 1000; i++)

n = i;

while(n > 0)

b = n % 10;

sum = sum + (b * b * b);

Similar questions