a. Write a declaration for the array below and name it matrix. -1 7 1 3 1 -1 -1 4 1 b. Given the contents of matrix above, write a program segment (NOT THE ENTIRE PROGRAM) that will print the elements of the array as well as the column and row totals. Do not worry about drawing the lines in the table. Example:

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter8: Arrays
Section: Chapter Questions
Problem 4MQ2
icon
Related questions
Question
C++
a.
** Write a declaration for the array below and name it matrix.
-1
7
1
2
-1
-1
b.
Given the contents of matrix above, write a program segment (NOT THE ENTIRE PROGRAM) that
will print the elements of the array as well as the column and row totals.
Do not worry about drawing the lines in the table. Example:
-1
7
1
3
Total = 10
1
2.
-1
-1
Total = 3
1
Total = 16
Total = 5
Total =13
Total = 1
Total = 8
C.
Pretend you don't know the contents of the array. Write the program segment (NOT THE ENTIRE
PROGRAM) that will print out all elements of matrix that are zero.
Transcribed Image Text:a. ** Write a declaration for the array below and name it matrix. -1 7 1 2 -1 -1 b. Given the contents of matrix above, write a program segment (NOT THE ENTIRE PROGRAM) that will print the elements of the array as well as the column and row totals. Do not worry about drawing the lines in the table. Example: -1 7 1 3 Total = 10 1 2. -1 -1 Total = 3 1 Total = 16 Total = 5 Total =13 Total = 1 Total = 8 C. Pretend you don't know the contents of the array. Write the program segment (NOT THE ENTIRE PROGRAM) that will print out all elements of matrix that are zero.
Expert Solution
steps

Step by step

Solved in 5 steps with 2 images

Blurred answer
Knowledge Booster
Function Arguments
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning