This site contain programs of different languages including Sitecore, C,C++, Visual Basic, Java and e books related programming. you can view,share and post your comments.
#include<stdio.h> #include<math.h> main() { int a,i,n,sum=0,am; printf("enter your number:"); scanf("%d",&n); a=n; while(n>0) { i=n%10; sum=sum+pow(i,3); n=n/10; } if(sum==a) printf("%d is amstrong",a); else printf("%d is not amstrong",a); }
No comments:
Post a Comment