Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c++ not sure how to accomplish this task. Question 3 Given that value [NUM ROW] [NUM cOLUMN] [NUM DEPTH] is a three dimensional array of

image text in transcribed

image text in transcribed

c++ not sure how to accomplish this task.

Question 3 Given that value [NUM ROW] [NUM cOLUMN] [NUM DEPTH] is a three dimensional array of double type and the three constants are defined as follows: define NUM ROW #de fine NUM COLUMN 4 define NUM DEPTH 3 double value [NUM_ROW] [NUM COLUMN] [NUMDEPTH]- 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 3.0, 3.1, 3.2, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 4.0, 4.1, 4.2, 4.1, 4.2, 4.3, 4.4, 2.5, 2.6, 2.7, 2.8, 2.9, 3.0, 3.1, 3.2; Write a C++ program that computes and prints out the following information about this 3d array: (1) The minimum and maximum values among all the array elements (2 points) (2) The average values of all the array elements (2 points) (3) The location (i, j, k) of the element that has the maximum value difference with its neighboring elements. Here (i, j, k) refers to the array indices of the element. The definition of neighboring elements is shown below: i, j - current element a, b, c, d - neighboring elements for i e, f - neighboring elements for j The value difference for i is a -i + lb- i |+|c-il d-i 1 i, j - current element a, b, c, a, d, e ,f - neighboring elements for j neighboring elements for i If the current element is inside the element domain, the neighboring elements are 6 (top, down, left, right, front, and back) You have to create at least three different functions to accomplish the above three tasks You are not allowed to use only the main routine to conduct the computation

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

Students also viewed these Databases questions

Question

What can you do this week to sharpen your crosscultural skills?

Answered: 1 week ago