To find the given number is armstrong (or) not

Program:

#include<stdio.h>
#include<conio.h>
void main()
{
    int n, r, s = 0, t;
    clrscr();
    printf("Enter a number : ");
    scanf("%d", &n);
    t = n;
    while(n > 0)
    {
        r = n % 10;
        s = s + (r * r * r);
        n = n / 10;
    }
    if(s == t)
    printf("\n%d is an armstrong number", t);
    else
    printf("\n%d is not an armstrong number", t);
    getch();
}

Output:

Case: 1

Enter a number : 153
153 is an armstrong number

Case: 2

Enter a number : 123
123 is not an armstrong number