Write a C Program to Check a number is Armstrong or not

Armstrong Number, Sumit Kar, Timus Rak


void main()


    int n, sum = 0, t, r;

    printf("Please enter a number: ");        




        r = t%10;

        sum = sum + r*r*r;


     if ( n == sum )

        printf("%d is an armstrong number.",n);


        printf("%d is not an armstrong number.",n);



Popular posts from this blog

Write a Program to Add two 3x3 Matrix using C

C program for Unit Conversion

Write a Program to Add two 5x5 Matrix using C