#include <stdio.h>
#include<math.h>
int main() {
    int num,a,b, rem, res= 0,count=0;
    printf("Enter a three-digit integer: /n");
    scanf("%d", &num);
    b=num;
    while(num>0){
        a=num%10;
        count+=1;
        a=a/10;
    }
    
    while (b!= 0) {
        rem = b % 10;
       res +=(pow(rem,count));
       b /= 10;
    }

    if (res== num)
        printf("%d is an Armstrong number/n", num);
    else
        printf("%d is not an Armstrong number ", num);

    return 0;
}