Question: 1. Write a C program which prompts the user to enter an integer, and then displays all the factors of that integer. To do this,

 1. Write a C program which prompts the user to enter

1. Write a C program which prompts the user to enter an integer, and then displays all the factors of that integer. To do this, you will need to check every number from 1 up to the number entered and see if it is evenly divisible (remainder is zero). HINT: Use an if statement within the loop to check if the original number is divisible by the current loop counter, and if it is then display that number as a factor. 2. Write a C program which calculates the factorial (!) of an integer number entered by the user. A factorial is defined as the product of all numbers from 1 up to and including the number itself. For example, 5' = 1 x 2 x 3 x 4 x 5 120. Also note that 0! = I. Note that factorials above about 13 are too large to compute, so you may get errors. Therefore, you should double precision for storing the factorial

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!