Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

#include <iostream>

using namespace std;

int main()
{ int n,r,c,cube,sum=0;
cin>>n;
c=n;
while(n>0)
{
r=n%10;
cube=r*r*r;
sum=sum+cube;
n=n/10;
}
if(c==sum){
cout<<"It is armstrong.";
}
return 0;
}

You might also like