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 |
Hey all, i have a circuit that contains a diode and 2 resistors here is a link to the image http://img46.imageshack.us/img46/2562/41930604.png what i am think is that VL = 0.7V because of the silicon diode so IL = 0.7/750*10^-3 = 0.9333 mA and V0 = 0.7V but i am not sure of my answerer
which type of question are putup in IES exam?
What are the different methods to turn on the thyristor?
Mention the protocols used in data transfer.
what is the use of GPRS AND WHERE IS THE USE IN BEHAVIOR LIFE.
if a crow sit on on current wire it will not fell current but a man touch it he get shock . why/
Why opamp called operational amplifier?
interrupt controller
generic values for: • Maximum power • Emission bandwidths and modulation types • Frequency ranges, frequency stability, attenuation of intermodulation products and selectivity of a quadband dual simm chinese cellphone?
i want aftek placement paper if any body have pls send me its urgent
Explain resistance?
What is the difference between active and passive filters?
Civil Engineering (5086)
Mechanical Engineering (4456)
Electrical Engineering (16639)
Electronics Communications (3918)
Chemical Engineering (1095)
Aeronautical Engineering (239)
Bio Engineering (96)
Metallurgy (361)
Industrial Engineering (259)
Instrumentation (3014)
Automobile Engineering (332)
Mechatronics Engineering (97)
Marine Engineering (124)
Power Plant Engineering (172)
Textile Engineering (575)
Production Engineering (25)
Satellite Systems Engineering (106)
Engineering AllOther (1379)