Sunday, 18 December 2016

Angestrom Number In C and C++ -- Simplest Method!!

#include<stdio.h>
main()
{
int num,i,j,s=0;
scanf("%d",&num);
while(num!=0)
{
j=num%10;
s=s+(j*j*j);
num/=10;

}
printf("%d",s);
}

2 comments:

Amazon1Ads