Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Programming language is C++ Original code: #include #include #include #include using namespace std; int main() { srand(time(0)); int a[9][9]; for (int i=0;i>r; cout>c; cout PA

Programming language is C++

image text in transcribed

Original code:

#include #include #include #include using namespace std; int main() { srand(time(0)); int a[9][9]; for (int i=0;i>r; cout>c; cout

PA 10-3 (25 points) Modify the program you just wrote to have the program sum the cells around the specified cell. Show results that include Row and/or Column 1 or 9. Hint: Initialize an 11 x 11 array with O's to take into account the values around the borders. Then put your 9x9 array in rows and columns in array[1][1] to array[9][9]. EACodeBlocks-EPCodeBlocks-EP Marsh20501bin DebuglMarsh2050.exe Columns 1 23 45 67 89 Row 1 Row 2 Row 3 Row 4 Row 5 Row 6 Row 7 Row 8 Row 9 7 08 749 8 1 3 8 6 2 30945 2 1 3 1 35 2 973 2 2 5 38 79 45 0 3 2 1 781 5 0 2 0 2 1 96 4 5 7 2 4 3 59 92 1 6 7 8 9 31 2 1 4 2 4 5 9 0 0 2 902 EACodeBlocks-EP1CodeBlocks-EP Marsh20501bin DebuglMarsh2050.exe Columns what array cel1 would you like to see? (Press ent Column9 The number 2 is in ce11 9,9 The sum of the cells surrounding cel1 9,9 is 6 1 2 3 45 6 78 9 Row - 9 Row 1 Row 2 Row 3 Row 4 Row 5 Row 6 Row 7 Row 8 Row 9 1 8 7 11 8 1 8 4 3 7 1913728 9 71 57 804 6 4 8 9 499 3 2 6 4 0 4 4 9 10 8 9 755 84 8 1 5 8 0 78 3 006 94 1 8 78 6 4 2 9 9 0 0 755 2 1 3 2 what array cell1 would you like to see? (Press ente Row 3 Column6 he number 8 is in cel1 3,6 he sum of the cells surrounding cell 3,6 is 39

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

Intelligent Information And Database Systems 6th Asian Conference Aciids 2014 Bangkok Thailand April 7 9 2014 Proceedings Part I 9 2014 Proceedings Part 1 Lnai 8397

Authors: Ngoc-Thanh Nguyen ,Boonwat Attachoo ,Bogdan Trawinski ,Kulwadee Somboonviwat

2014th Edition

3319054759, 978-3319054759

More Books

Students also viewed these Databases questions

Question

LO2 Identify components of workflow analysis.

Answered: 1 week ago