#include <stdio.h>

int main() {
 int i,sum=0,r,n1;
    printf("enter a num:");
    scanf("%d",&i);
    n1=i;
    while(i>0)
        {
            r=i%10;
            sum=sum+r*r*r;
            i=i/10;
        }{
        if(n1==sum)
            printf("amstrong num");
        else
            printf("not amstrong");
        }
    
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: