/*format agency fb bold 14*/ /*program to find whether the given number is an armstrong number or not*/ number an example:135=1*1*1+3*3*3+5*5*5=135;
armstrong
#include<stdio.h> #include #include<math.h> void main(0 { int n,m,i,rem,sum=0; printf("enter the number to be checked:"); scanf("%d",&n); m=n; while(n>0) { rem=n%10; sum=sum+pow(rem,3); n=n/10; } if(m==sum) { printf("the given number is an armstrong number"); } else printf("the given number is not an armstrong number"); getch(); }
the given number is a strong number or not*/
/*program to find whether strong
number an example: 145=1!+4!+5!=1+24+120; #include<stdio.h> #include #include<math.h> void main(0 { int m,n,i,f=1,sum=0,rem; printf("enetr the number:"); scanf("%d",&n); m=n; while(n>0) { rem=n%10; for(i=0;i
} if(m==sum) { printf("the given number is a strong number"); } else printf("the given number is not a strong number"); getch(); } thank you.. vinaychalluru