Armstrong And Strong

  • October 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Armstrong And Strong as PDF for free.

More details

  • Words: 131
  • Pages: 2
/*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

Related Documents

Armstrong And Strong
October 2019 11
Lance Armstrong
November 2019 28
Bomba Armstrong
June 2020 18
Martin Armstrong
April 2020 16
Armstrong Lighthouse
May 2020 11