I have the following problem for my test and have no idea how to start =/
1. Write a program to simulate a lottery drawing that uses balls numbered from 1 through 10. Assume that three balls are drawn at random. (Allow user input the number of lottery drawings to simulate). Your will simulate 10 lottery drawings. Store those data to a 10X3 array. The columns indicate the three balls in a lottery drawing. The rows indicate the 10 times drawings. In this exercise, You will need to calculate:
1) What percentage of the time does the result contain three even numbers in the simulation? Write a function to finish this task.
2) What percentage of the time does the number 5 occur in the three numbers in the simulation? Write a function to finish this task.
3) Print out the original input (10 times drawings) properly on the screen. Then print out the percentage of time that the result contains three even numbers. Finally print out the percentage of the time that number 5 occurs in the three numbers in a lottery drawing.
Good place to start. Take it from there. Make it just do one problem at a time. Once you've got step 1 working, then try to do step 2. Well, in your case, step 1 (since you actually have 2 step 1s).
int main( void )
Try looking up the functions rand() and srand(), as well as the use of the % mathematical operation.