subject

Minesweeper is a single-player game in which the player continuously selects different cells of an grid. each cell of the grid is either occupied by a bomb or is a safe cell. if a cell is occupied and the player selects the cell, the player loses. otherwise, the selected cell shows the number of bombs in the neighboring cells. a neighbor cell is a cell next to the current cell in the horizontal, vertical, and diagonal direction. write a program that receives in the first input line "m" and "n" as the number of rows and columns of the grid, respectively. in the second line, the user inputs an integer, "b", showing the number of bombs placed in the grid. it then follows by lines of input from the user, each referring to the row and column index of each one of the bombs. after receiving grid dimensions, the number of bombs, and bomb locations, you will need to display (print) the completed grid showing the bomb cells with * and safe cells with the number of bombs neighboring that cell. sample input 1: 2 220 01 1sample output 1: * 22 *sample input 2: 5 341 22 24 04 1sample output 2: 0 1 10 2 *0 2 *2 3 2* * 1sample input 3: 4 770 01 12 23 32 41 50 6sample output 3: * 2 1 0 1 2 *2 * 2 2 2 * 21 2 * 3 * 2 10 1 2 * 2 1 0sample input 4: 2 650 11 01 11 21 5sample output 4: 3 * 3 1 1 1* * * 1 1 *sample input 5: 3 390 00 10 21 01 11 22 02 12 2sample output 5: * * ** * ** * *

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 22:00
Researchers measured the data speeds for a particular smartphone carrier at 50 airports. the highest speed measured was 78.1 mbps. the complete list of 50 data speeds has a mean of x overbarequals16.11 mbps and a standard deviation of sequals18.65 mbps. a. what is the difference between carrier's highest data speed and the mean of all 50 data speeds? b. how many standard deviations is that [the difference found in part (a)]? c. convert the carrier's highest data speed to a z score. d. if we consider data speeds that convert to z scores between minus2 and 2 to be neither significantly low nor significantly high, is the carrier's highest data speed significant? a. the difference is nothing mbps.
Answers: 3
question
Computers and Technology, 23.06.2019 01:30
1. which of the following is a search engine? a) mozilla firefox b)internet explorer c)google d)safari 2. which of the following statements is true? a) all search engines will provide the same results when you enter the same query. b) all search engines use the same amount of advertisements. c) some search engines are also browsers. d) search engines often provide different results, even when you enter the same query.
Answers: 2
question
Computers and Technology, 23.06.2019 15:00
Barbara is interested in pursuing a career in the science and math pathway. which qualifications will her reach that goal? a.an advanced knowledge of physics and math b.an advanced knowledge of engineering and math c. an advanced knowledge of physics and robotics an d. advanced knowledge of machinery and math
Answers: 2
question
Computers and Technology, 24.06.2019 13:00
Which best describes the condition under which the unicode output is the same as plain text ?
Answers: 1
You know the right answer?
Minesweeper is a single-player game in which the player continuously selects different cells of an g...
Questions
question
Mathematics, 01.11.2021 20:10
question
Mathematics, 01.11.2021 20:10
question
Computers and Technology, 01.11.2021 20:10
question
English, 01.11.2021 20:10
question
Mathematics, 01.11.2021 20:20
Questions on the website: 13722363