Question: 4) Write a program which prints all Strong numbers within a range (say starting limit is 1 and ending limit is 1000; limits entered

4) Write a program which prints all Strong numbers within a range

 

4) Write a program which prints all Strong numbers within a range (say starting limit is 1 and ending limit is 1000; limits entered by the user). Use loops to solve this problem. Strong number is a special positive number (consider base 10) whose sum of the factorial of digits is equal to the original number. For example, 145 is a Strong number because the sum of factorial of its digits 11+41+5! is 145(1+24+120). [Write the full code.] 5) Write a function that will take an integer number as an argument and return the sum of factors of the number. Call this function repeatedly from main () and sum the result returned from the function. The infinite loop in main () should terminate if you enter a negative number and will do nothing if the user input is 0. [use break, continue, Write full code] Sample output: Enter number: 2 The factors of 2:1 2 Enter number: 5 The factors of 5:1 5 Enter number: 0 Enter number: -1 The sum of factor's sum is 9 [NB: 9-1+2+1+5] Done with Mid Term.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Certainly Here are the full codes for the two programs you requested Program 1 Printing all Strong n... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!