answersLogoWhite

0


Best Answer
Copy

Strong number:-

The sum of the factorials of digits of a number is equal to the original number.

Ex: n=145=> 1! + 4! + 5! = 1 + 24 + 120 = 145

so it is strong number.

Armstrong number:-

The sum of the cubes of digits of a number is equal to the original number.

Ex: n=153 => 13 + 53 +33 = 1+125+27= 153

so 153 is arm strong number.

C program for strong numbers

#include

#include

void main()

{

int sof=0,n,dn,ctr,prod,rem;

printf("Enter the number\n");

scanf("%d",&n);

dn=n;

while(n!=0)

{

prod=1,ctr=1;

rem=n%10;

while(ctr<=rem)

{

prod=prod*ctr;

ctr=ctr+1;

}

sof=sof+prod;

n=n/10;

}

if(sof==dn)

{

printf("The number entered is strong number");

}

else

{

printf("The number entered is not a strong number");

}

}

C program for amstrong numbers

#include

#include

void main()

{

int dn,rem,sum,n;

printf("Enter the number:");

scanf("%d",&n);

for(dn=n,sum=0;n!=0;rem=n%10,sum=sum+rem*rem*rem,n=n/10);

if(dn==sum)

printf("Amstrong number");

else

printf("Not a amstrong number");

}

By Nagarjuna ECE

sri indu,

IBP

User Avatar

Wiki User

โˆ™ 2010-01-17 06:38:21
This answer is:
๐Ÿ™
0
๐Ÿคจ
0
๐Ÿ˜ฎ
0
๐Ÿ˜‚
0
User Avatar

Add your answer:

Earn +5 pts
Q: What is strong number n Armstrong number in C language?
Write your answer...
Submit

Related Questions

Program in c to find whether number is a Armstrong or strong number?

#include &lt;stdio.h&gt; #include &lt;math.h&gt; void main() { int number, sum = 0, rem = 0, cube = 0, temp; printf ("enter a number"); scanf("%d", &amp;number); temp = number; while (number != 0) { rem = number % 10; cube = pow(rem, 3); sum = sum + cube; number = number / 10; } if (sum == temp) printf ("The given no is armstrong no"); else printf ("The given no is not a armstrong no"); }


What does Armstrong mean in C programming?

Armstrong number means 153=(1^3)+(5^3)+(3^3)


Write a program in c to find Armstrong number using if condition?

#include&lt;stdio.h&gt; #include&lt;conio.h&gt; #include&lt;math.h&gt; int armstrong(int num) { int i,c=0,arm=0; int ar[100]; for(i=0;i&lt;100;i++) { ar[i]=0; } while(num&gt;0) { ar[c]=num%10; c++; num/=10; } for(i=1;i&lt;c;i++) { arm+=pow(ar[i],3); } return arm; } void main() { clrscr(); int n,a=0; printf("\n Enter the number: "); scanf("%d",&amp;n); a=armstrong(n); printf("\n The number %d is",n); if(n==a) printf(" armstrong number"); else printf(" not an armstrong number"); getch(); }


What has the author T C L Armstrong written?

T. C. L. Armstrong has written: 'Notes on the examination papers in English literature' -- subject(s): English literature, Etymology, Explication, English language, History and criticism


What is the Aram strong number in c plus plus?

If the sum of squares of digits of a number equals to the number itself, then that number is called an aram strong number.


Write a program in c language that inputs 2 number and solve using euclidean algorithm?

how to write a programm to add number like123 in c language


What is the definition of c sharp programming language?

C# is a derivative of C++, designed to allow C++ programmers to take advantage of the .NET environment. Officially, it is an object oriented language that encompasses strong typing and component orientation.


Floating point number in c-language?

any real number e.g, 15.5 1456.223 4568.12


How do you print number in digits in c language?

with printf


When was C. W. Armstrong born?

C. W. Armstrong was born in 1899.


When did C. W. Armstrong die?

C. W. Armstrong died in 1986.


What has the author Samuel C Armstrong written?

Samuel C. Armstrong has written: 'Ideas on education'


When was C. Michael Armstrong born?

C. Michael Armstrong was born on October 18th, 1938.


When did Samuel C. Armstrong die?

Samuel C. Armstrong died on 1893-05-11.


When was Samuel C. Armstrong born?

Samuel C. Armstrong was born on 1839-01-30.


What has the author James C Armstrong written?

James C. Armstrong has written: 'Html Reference Cards'


When did Frederick C. Armstrong die?

Frederick C. Armstrong died on 1918-03-25.


When was Frederick C. Armstrong born?

Frederick C. Armstrong was born on 1896-06-13.


What represents valid integer number in c language?

1500


Write a c program to check Armstrong number using functions?

This site is not for home-works, it is for questions.


Write a c program to find Armstrong number using ifstatement?

This is not a question, it is a request for someone to do your homework.


Where was C. Michael Armstrong born?

C. Michael Armstrong was born in Detroit, Michigan in the United States.


What has the author C B Armstrong written?

C. B. Armstrong has written: 'Creeds and credibility' 'An itch for scribbling'


What is the meaning of percent a in c language?

The meaning of percent a in c language is that it is a float handling operator. It prints out a float variable type into a hexadecimal number.


Why c language has name c why not a?

C-language was derived from B-language.