#include<stdio.h>
int cube(int n)
{
return (n*n*n);
}/*function to return cubic root*/
int sumcube(int x)
{
int sum=0,m;
while(x>0)
{
m=x%10;
sum=sum+(cube(m));
x=x/10;
}
return sum;
}/* returns the sum if cubic digits of an integer*/
int main ()
{
int i;
for(i=1; i<=5000; i++)
{
if (i==sumcube(i));
{
printf("%d\t",i);
}
}
}
/* this program is to check wether a number is an armestrong from 1 to 5000 as well as to check the output was all the integers from 1 to 5000*/