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..

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is parallel data transfer process?

1080


Define fbus protocol?

981


What is the output power of a BTS, in dbm &watts if trx=2+2+2... if trx=4+4+4..

2584


What is step up cyclo-converter ?

1083


What is the difference between a multiplexer and encoder? Also what is the between demultiplexer and decoder?

1011


Draw the circuit of ce configurations using npn transistor.

1038


1. How many TRXs are supported in Nokia Metrosite 2. What is the command to lock the TRX 3. What is the command to unlock the BTS 4. What is the command from BSC to check the alarm in BTS 5. What is the maximum transmit power of FlexiEdge BTS 6. When Abis link is down, name the alarm that is generated at BSC 7. Orange LED on RRI card is glowing – what is the indication? 8. How many E1s are supported by one E1 card in BTS 9. How many ways one can login to BIO card? 10. What are the different data rates in Abis for Traffic, TRX signaling and OMU 11. BCSU card in BSC can support how many TRXs? 12. What is the command to check list of sites that are down? 13. How many TRX are supported when we use one M2HA card in BTS? 14. Name the different types of power supply card in BTS and the output power of each card 15. Ater interface is between transcoder and MSC – True/False 16. SS7 signaling is used in Abis interface – True/False 17. FlexiEdge BTS has RRI card – True/False 18. From Transcoder to MSC, data rate for each call is 64Kbps – True/false 19. Name different types of TRXs which supports different GSM bands 20. ODU LED shows orange – what is the significance?

4252


What are the active wastes in nuclear submarrine and how they disposed or dump?

2059


What are the functions of base station system (bss)?

1074


whats the new trend in ece...? why we are going for embedded..?

2008


Name some of the current controlled (current driven) devices?

1206


how to fall in love?

2348


What are the applications of flip-flops?

962


Ripple as referred to in a rectifier circuit.

1037


hi...i had completed B.E.in Electronics & Communication.i had applied Section Engineer in railway recruit ment 2012.I need previous year exam papers.

2052