Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


write a C programme to print all the strong numbers below 10000..



write a C programme to print all the strong numbers below 10000....

Answer / shiv darshan

#include<stdio.h>
int main(){
int num,i,f,r,sum,temp;
int max;


printf("Enter maximum range: ");
scanf("%d",&max);

printf("Strong numbers in given range are: ");
for(num=1; num <= max; num++){
temp = num;
sum=0;

while(temp){
i=1;
f=1;
r=temp%10;

while(i<=r){
f=f*i;
i++;
}
sum=sum+f;
temp=temp/10;
}

if(sum==num)
printf("%d ",num);
}
return 0;
}


Definition of strong number:

A number is called strong number if sum of the factorial of its digit is equal to number itself. For example: 145 since
1! + 4! + 5! = 1 + 24 + 120 = 145

Is This Answer Correct ?    5 Yes 0 No

Post New Answer

More Electronics Communications Interview Questions

Define what is a high-pass filter?

0 Answers  


Explain what is the difference between plc and dcs?

0 Answers  


why rs232 is used in uart when there are many rs devices like rs449 etc . what is the main advantage in using rs232

0 Answers  


how works an op-amp

1 Answers  


Mention some typical applications of pll?

0 Answers  


among the chebsew and butterworth filter which is more efficient?

5 Answers  


What do you mean by Frequency re-use?

1 Answers  


Write a program using micrprocessor?

2 Answers   CTS, Practical Viva Questions, Wipro,


Dear all, I am working as engineer in an electronics industry since 3 years,and i would like to apply PR visa for australia,i got 6 bands in all modules in ielts(general).please let me know what should i do now?

0 Answers  


1.Explain about RELAY. 2 . Explain about EARTH working  ((how earth connection working ))

3 Answers   Siemens, Sun Pharma,


Which type of communication used in nuclear submarrine for communication from capton to out side the marrine?

0 Answers   BARC,


Define the meaning of tristate signal in electronics?

0 Answers  


Categories
  • Civil Engineering Interview Questions Civil Engineering (5086)
  • Mechanical Engineering Interview Questions Mechanical Engineering (4456)
  • Electrical Engineering Interview Questions Electrical Engineering (16639)
  • Electronics Communications Interview Questions Electronics Communications (3918)
  • Chemical Engineering Interview Questions Chemical Engineering (1095)
  • Aeronautical Engineering Interview Questions Aeronautical Engineering (239)
  • Bio Engineering Interview Questions Bio Engineering (96)
  • Metallurgy Interview Questions Metallurgy (361)
  • Industrial Engineering Interview Questions Industrial Engineering (259)
  • Instrumentation Interview Questions Instrumentation (3014)
  • Automobile Engineering Interview Questions Automobile Engineering (332)
  • Mechatronics Engineering Interview Questions Mechatronics Engineering (97)
  • Marine Engineering Interview Questions Marine Engineering (124)
  • Power Plant Engineering Interview Questions Power Plant Engineering (172)
  • Textile Engineering Interview Questions Textile Engineering (575)
  • Production Engineering Interview Questions Production Engineering (25)
  • Satellite Systems Engineering Interview Questions Satellite Systems Engineering (106)
  • Engineering AllOther Interview Questions Engineering AllOther (1379)