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:
Anonymous
12:05 am, December 18, 2016
Thanks
Reply
Delete
Replies
Programmer Mohd
3:30 pm, August 30, 2017
your welcome
Delete
Replies
Reply
Reply
Add comment
Load more...
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Amazon1Ads
Thanks
ReplyDeleteyour welcome
Delete