I need help with below problem. Can somebody help me please ?

Thank you

Val

The Problem

Your program will prompt the user for a single positive integer greater than 1. If the user does not enter a valid integer, then your program should continue to reprompt the user for a value until a valid integer is entered. Once the integer is read in, your program will print out the following information about the integer:

1) A list of each of the positive factors of the given integer.

2) The number of factors the given integer has.

3) The sum of the factors of the integer.

4) The product of the factors of the integer.

The key idea which will help solve this problem is attempting to divide the given integer by each integer in between 1 and itself. If a particular division works "perfectly," then the value you have tried is a factor of the given integer. (Note: This description is intentionally vague so that you have to determine the specifics of the method of solution.)

Restrictions

Name the file you create and turn in numbers.c. Although you may use other compilers, your program must compile and run using gcc. If you use your olympus account to work on this assignment, please follow the steps shown in class to create, compile, and test your program. Your program should include a header comment with the following information: your name, course number, section number, assignment title, and date. You should also include comments throughout your code, when appropriate. If you have any questions about this, please see a TA.

Chance for Extra Credit

There is a relationship between the integer entered by the user, the number of factors that integer has and the product of those factors. If you can determine this relationship, you will be eligible for some extra credit for this assignment. Please put your answer in a comment right after your header comment in your program. (Note: If you need to specify a power in the text of this comment, use the ^ symbol. For example, (x+y)^z stands for the quantity of x plus y raised to the z power. If you have any questions about the extra credit, please ask your instructor or TA.)

Input Specification

The value the user enters will be an integer. It will be your job to check to see whether this integer is greater than or equal to two or not. If it is, your program should proceed. If it is not, your program should reprompt the user for a value until one greater than or equal to two is entered. You are guaranteed that the integer entered by the user will be such that the product of the factors of the integer will NOT cause an overflow problem for the int data type. In particular, none of the values your program will have to print out will be more than 231-1.

Output Specification

Your output should follow the specification below:

Here is a list of the positive factors of X:

A B C D

The number of positive factors of X is Y.

The sum of the positive factors of X is Z.

The product of the positive factors of X is W.

Deliverables

A single source file named numbers.c turned in through WebCT.

Output Samples

Here are three sample outputs of running the program. Note that this set of tests is NOT a comprensive test. You should test your program with different data than is shown here based on the specifications given. The user input is given in italics while the program output is in bold.

Output Sample #1

Enter a positive integer greater than one.

-2

Sorry, that input is not valid.

Enter a positive integer greater than one.

-100

Sorry, that input is not valid.

Enter a positive integer greater than one.

9

Here is a list of the positive factors of 9:

1 3 9

The number of positive factors of 9 is 3.

The sum of the positive factors of 9 is 13.

The product of the positive factors of 9 is 27.

Output Sample #2

Enter a positive integer greater than one.

12

Here is a list of the positive factors of 12:

1 2 3 4 6 12

The number of positive factors of 12 is 6.

The sum of the positive factors of 12 is 28.

The product of the positive factors of 12 is 1728.

Output Sample #3

Enter a positive integer greater than one.

100

Here is a list of the positive factors of 100:

1 2 4 5 10 20 25 50 100

The number of positive factors of 100 is 9.

The sum of the positive factors of 100 is 217.

The product of the positive factors of 100 is 1000000000.