2:10 PM
C++ Program of STRONG NUMBER

Write a Program of STRONG NUMBER

 
#include<iostream.h> 
#include<conio.h> 
 
void main()
{
int num,i,f,r,sum=0,temp;
clrscr();
printf("\nEnter a number");
scanf("%d",&num);
temp=num;
while(num)
{
i=1,f=1;
r=num%10;
while(i<=r)
{
f=f*i;
i++;
}
sum=sum+f;
num=num/10;
}
if(sum==temp)
printf("%d is a strong number",temp);
else
printf("%d is not a strong number",temp);
getch();
}
 
 
Note:    
           If you want to change in this program please write through the comment on this page. you can also past similar program of 
             c++ with output.your comment is valuable to the other user and person.
Views: 102 | Added by: vijoriya | Tags: program, strong, c++, Number | Rating: 0.0/0
Total comments: 0
avatar