Question: C++ Write a function floodMap which accepts three input arguments, in this order: (1) a two-dimensional array of double. Each element of the array indicates

C++

C++ Write a function floodMap which accepts three input arguments, in this

Write a function floodMap which accepts three input arguments, in this order: (1) a two-dimensional array of double. Each element of the array indicates the height of the terrain at a particular point (assume that there are 4 columns). (2) An integer indicating the number of rows in the map, and (3) a double indicating the current water level. The function should print out a "map" of which points in the array are below the water level. In particular, each position at or below the water level will be represented with aand each position above the water level will be represented with an underscore_ Your function should be named floodMap Your function should take three parameters, in this order: o a two-dimensional array of double with 4 columns, the integer number of rows in the array, and o a double indicating the current water level Your function should print a flood map as described below. Your function should not return anything For example: Test Result double map [4] [4]t5.9064, 15.7541, 6.11483, 11.39281,* (16.8498, 5.736, 9.33342, 6.36095 3.18645, 16.935, 4.7586, 9.63635 2.22407, 0.815145, 0.298158, 13.466 floodMap (map, 4, 9.3); xxk

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!