Input
Output
#include<stdio.h> void main() { int n=9,r,sum=0,t; //clrscr();//clear the screen printf("Enter the number: "); //scanf("%d",&n); //9 t=n; while(t>0) { r=t%10; sum=sum+(r*r*r); t=t/10; } if(n==sum) { printf("%d is armstrong number.",n); } else { printf("%d is not armstrong number.",n); } }