Must use C language to create a BINGO game Criteria: 1. bingo array must be a 2D array of 5x5 2.Generate unique random number for each column and row of the bingo card 3. Create a function to fill the bingo card with random numbers. Each column has its own range. Column B is between 1-15, column I between 16-30, column N between 31-45, column G between 46-60, and column O between 61-75. Total unique random numbers generate are 75. 4. Write a function to print the bingo card 5. Write a function to pick a number that has not already been chosen. You will need to use a 1D array to keep track of which numbers between 1 and 75 have been used so that you don’t pick numbers that have already been called. If you randomly pick a number that was already
Must use C language to create a BINGO game
Criteria:
1. bingo array must be a 2D array of 5x5
2.Generate unique random number for each column and row of the bingo card
3. Create a function to fill the bingo card with random numbers. Each column has its own range. Column B is between 1-15,
column I between 16-30, column N between 31-45, column G between 46-60, and column O between 61-75. Total unique random numbers generate are 75.
4. Write a function to print the bingo card
5. Write a function to pick a number that has not already been chosen. You will need to use a 1D array to keep track of which numbers between 1 and 75 have been used so that you don’t pick numbers that have already been called. If you randomly pick a number that was already called, then pick another. Continue this process until you find a number that has not been previously called. Print the number to the screen along with its corresponding letter. This function should return that value.
6. Write a function to determine if a called number exists in the player’s bingo card. Pass the bingo array and the number to the function. Loop over the array (nested for loops) and, if the number is found in the bingo array, then change the value to 0 to “mark” it. If the number is found, then this function should return true; otherwise, return false.
7. Write a function to check for a completed row. A completed row is a row in the bingo array that has 0 for every value (we “marked” our bingo numbers by changing the existing value to zero to indicate that the called number matches one in our bingo card). This function should check every row in the bingo array and return whether or not it found a completed row.
8. Write a function to check for a completed column. A completed column is a column in the bingo array that has 0 for every value (we “marked” our bingo numbers by changing the existing value to zero to indicate that the called number matches one in our bingo card). This function should check every column in the bingo array and return whether or not it found a completed column.
Add prototypes for the functions at the top of the program.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images