#include <math.h> #include <stdio.h> int main() { int low, high,n,t,a,count = 0; double result = 0.0; printf("Enter two numbers: "); scanf("%d %d", &low, &high); printf("Armstrong numbers between %d and %d are: ", low, high); for (n = low + 1; n < high;n++) { t = n; while (t>0) { t /= 10; count++; } t=n; while (t>0) { a =t % 10; result =result + pow(a, count); t=t/10; } if (result == n) { printf("%d ", n); } count = 0; result = 0; } return 0; }