2. Dimensionary Investigation by Jay Vince Serato Iam Detective Jake Peralta. I am here to investigate a series of suspicious activities in the area. I have received a tip that someone is going to get mugged in my district. It seems that the victim is the most wealthy among the populace. Given an area represented by a 2-Dimensional Array, sum up the four numbers that are directly around the biggest number in the 2-D Array -- the one at the top, left, right, and bottom. Assume that there will be only one such number in the array. Dont worry if the said number has no number above or below iR, or at its left or right; that just makes my job easier. Example in the following 2-0 Array 5716 2618 1547 5891 4451 I see that 9 is the largest number in the aray, and therefore I will be adding up the number above it (4), the number at its left (8), the number at its right (1), and the number below it (s). Input 1. Number of Rows 2. Number of Columns 3. Elements of the 2-0 Array Output Enter nunber of rows: 5 Enter nunber of coluns: 4 Elements: 5716 2618 1547 5891 445

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Dimensionary Investigation

Code in C language

main.c
: > + c
Executions
2. Dimensionary Investigation
by Jay Vince Serato
E Run Tests
I am Detective Jake Peralta. I am here to investigate a series of suspicious
activities in the area. I have received a tip that someone is going to get mugged in
Test Cases
my district. It seems that the victim is the most wealthy among the populace.
Given an area represented by a 2-Dimensional Array, sum up the four numbers that
O Test Case 1
are directly around the biggest number in the 2-D Array -- the one at the top, left,
right, and bottom.
Your Output
Assume that there will be only one such number in the array. Don't worry if the said
No Output
number has no number above or below it, or at its left or right; that just makes my
job easier.
Expected Output
Example in the following 2-D Array:
Enter number of rows: 5
5716
Enter number of columns: 4
2618
Elements:
1547
5716
5891
2618
4451
1547
5 89 1
4 451
I see that 9 is the largest number in the array, and therefore I will be adding up the
number above it (4), the number at its left (8), the number at its right (1), and the
number below it (5).
Suspect sum = 18
Input
1. Number of Rows
O Test Case 2
2. Number of Columns
3. Elements of the 2-D Array
O Test Case 3
Output
O Test Case 4
Enter number of rows: 5
Enter number of columns: 4
Elements:
O Test Case 5 Hidden
5-7-1-6
26-18
1.5.47
O Test Case 6 Hidden
589 1
4.45 1
O Test Case 7 Hidden
Suspect Sum = 18
Transcribed Image Text:main.c : > + c Executions 2. Dimensionary Investigation by Jay Vince Serato E Run Tests I am Detective Jake Peralta. I am here to investigate a series of suspicious activities in the area. I have received a tip that someone is going to get mugged in Test Cases my district. It seems that the victim is the most wealthy among the populace. Given an area represented by a 2-Dimensional Array, sum up the four numbers that O Test Case 1 are directly around the biggest number in the 2-D Array -- the one at the top, left, right, and bottom. Your Output Assume that there will be only one such number in the array. Don't worry if the said No Output number has no number above or below it, or at its left or right; that just makes my job easier. Expected Output Example in the following 2-D Array: Enter number of rows: 5 5716 Enter number of columns: 4 2618 Elements: 1547 5716 5891 2618 4451 1547 5 89 1 4 451 I see that 9 is the largest number in the array, and therefore I will be adding up the number above it (4), the number at its left (8), the number at its right (1), and the number below it (5). Suspect sum = 18 Input 1. Number of Rows O Test Case 2 2. Number of Columns 3. Elements of the 2-D Array O Test Case 3 Output O Test Case 4 Enter number of rows: 5 Enter number of columns: 4 Elements: O Test Case 5 Hidden 5-7-1-6 26-18 1.5.47 O Test Case 6 Hidden 589 1 4.45 1 O Test Case 7 Hidden Suspect Sum = 18
Expert Solution
steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education