I'm having some problem with my Computer Science lab. I really need some help! Here is the problem It should be written in C.

Problem: Given up to 30 integer values (all greater than 0) as input, find the smallest integer that is a multiple of more than half of the data input.

Example Execution #1:

Enter data #1 or -1 to exit: 1

Enter data #2 or -1 to exit: 2

Enter data #3 or -1 to exit: 3

Enter data #4 or -1 to exit: 4

Enter data #5 or -1 to exit: 5

Enter data #6 or -1 to exit: -1

Data entered: 1 2 3 4 5

The least majority multiple (3 of 5 values): 4

Example Execution #1 Explained:

Three values in the set {1, 2, 4} have 4 as a multiple.

A -1 is required to indicate the end of input when the number of data

values entered is less than 30.

Example Execution #2:

Enter data #1 or -1 to exit: 1

Enter data #2 or -1 to exit: 2

Enter data #3 or -1 to exit: 3

Enter data #4 or -1 to exit: 4

Enter data #5 or -1 to exit: 5

Enter data #6 or -1 to exit: 6

Enter data #7 or -1 to exit: -1

Data entered: 1 2 3 4 5 6

The least majority multiple (4 of 6 values): 6

Example Execution #2 Explained:

Three values in the set {1, 2, 4} have 4 as a multiple, but in the case of

an even number of data items a minimum of one more than half of the

number of data is necessary.

A -1 is required to indicate the end of input when the number of data

values entered is less than 30.

Example Execution #3:

Enter data #1 or -1 to exit: 1

Enter data #2 or -1 to exit: 11

Enter data #3 or -1 to exit: 4

Enter data #4 or -1 to exit: 6

Enter data #5 or -1 to exit: 8

Enter data #6 or -1 to exit: 2

Enter data #7 or -1 to exit: -1

Data entered: 1 11 4 6 8 2

The least majority multiple (4 of 6 values): 8

Example Execution #4:

Enter data #1 or -1 to exit: 11

Enter data #2 or -1 to exit: 12

Enter data #3 or -1 to exit: 13

Enter data #4 or -1 to exit: 14

Enter data #5 or -1 to exit: 15

Enter data #6 or -1 to exit: 16

Enter data #7 or -1 to exit: 17

Enter data #8 or -1 to exit: 18

Enter data #9 or -1 to exit: 19

Enter data #10 or -1 to exit: 20

Enter data #11 or -1 to exit: 1

Enter data #12 or -1 to exit: 2

Enter data #13 or -1 to exit: 3

Enter data #14 or -1 to exit: 4

Enter data #15 or -1 to exit: 5

Enter data #16 or -1 to exit: 6

Enter data #17 or -1 to exit: 7

Enter data #18 or -1 to exit: 8

Enter data #19 or -1 to exit: 9

Enter data #20 or -1 to exit: 10

Enter data #21 or -1 to exit: 21

Enter data #22 or -1 to exit: 22

Enter data #23 or -1 to exit: 23

Enter data #24 or -1 to exit: 24

Enter data #25 or -1 to exit: 25

Enter data #26 or -1 to exit: 26

Enter data #27 or -1 to exit: 27

Enter data #28 or -1 to exit: 28

Enter data #29 or -1 to exit: 29

Enter data #30 or -1 to exit: 30

Data entered: 11 12 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 10 21 22 23 24 25 26 27 28 29 30

The least majority multiple (16 of 30 values): 720

Example Execution #4 Explained:

When 30 integer values are entered the input should stop and the

program would continue. A -1 is not needed in this case.

Potential Problem: Once you have the program working for

this case, try it again substituting the last data item with a -1.

Example Execution #5:

Enter data #1 or -1 to exit: 23

Enter data #2 or -1 to exit: 37

Enter data #3 or -1 to exit: 41

Enter data #4 or -1 to exit: -1

Data entered: 23 37 41

The least majority multiple (2 of 3 values): 851

Example Execution #6:

Enter data #1 or -1 to exit: 59

Enter data #2 or -1 to exit: 61

Enter data #3 or -1 to exit: 67

Enter data #4 or -1 to exit: 31

Enter data #5 or -1 to exit: 37

Enter data #6 or -1 to exit: 41

Enter data #7 or -1 to exit: 43

Enter data #8 or -1 to exit: 47

Enter data #9 or -1 to exit: 53

Enter data #10 or -1 to exit: -1

Data entered: 59 61 67 31 37 41 43 47 53

Cannot find a least majority multiple less than or equal to 10000000!

Example Execution #6 Explained:

Do not search for a multiple that is greater than 10,000,000.

The whole program needs to display everything that is under Example Exectuion. The explanation is not necessary, it just explains what is going on to the programmer. I really need some help on this because the TA's at my college aren't willing to help because the professor is really strick on anybody helping for homework and projects. Please use simple coding because I will have to reprogram it. Thanks in advance for the help! I am a big newbie so please help!!! thanks a lot.