Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help with this c++ function, I do not need a int main() function in it just a singular function. Write a function floodMap

I need help with this c++ function, I do not need a int main() function in it just a singular function.

image text in transcribed

Write a function floodMap which takes three arguments, a two-dimensional array of doubles indicating the height of the terrain at a particular point in space (assume that there are 4 columns), an int indicating the number of rows in the map, and 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 a and each position above the water level will be represented with a Your function should be named floodMap Your function should take three parameters. o o o Atwo-dimensional array of doubles with 4 columns. The number of rows in the array. A double indicating the current water level Your function should print a flood map as described. Examples double map [1] [4] 5.0, 7.6, 3.1, 292)) * *_ floodMap (map, 1, 6.0) double map [2] [4] {(0.2, 0.8, 0.8, 0.2), = -- (0.2, 0.2, 0.8, 0.5) floodMap (map, 2, 0.0) double map [2] 4]-o.2, 0.8, 0.8, 0.2* (0.2, 0.2, 0.8, 0.5) _* floodMap (map, 2, 0.5) double map [2] [4] -0.2, 0.8, 0.8, 0.2], 0.2, 0.2, 0.8, 0.51* floodMap (map, 2, 1.0)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 11 The Database For Big Data And Analytics

Authors: Cristian Molaro, Surekha Parekh, Terry Purcell, Julian Stuhler

1st Edition

1583473858, 978-1583473856

More Books

Students also viewed these Databases questions

Question

=+5 Evaluate whether the CCT program was effective.

Answered: 1 week ago

Question

=+Identify the type of global assignment for which CCT is needed.

Answered: 1 week ago