Important This programming assigument is for ALL the students, those .pdf

Important This programming assigument is for ALL the students, those who subscribed to zyBooks and those who did not. It contains one problem. - Submit your source code on Moodle. You must name your source file as follows: - For write your code in a file named a5submat.ce - Use source file templatef.cc from the files provided on Moodle to start your program. - The problem is marked out of 10 points. 2 Programming problem P1: A matrix is a two dimensional vector (or a vector of vectors). See https://en.wikipedia.org/ wiki/Matrix_(mathenatics) for a definition. A sub-matrix A of a matrix A is a matrix obtained by retaining elements of A that belong to a subset of rows and columns of A. We consider the rows and columns of A identified by their index. For example, suppose matrix A is a 45 matrix. The leftmost column of A is at index 0 . The rightmost column of A is at index 4. The top row of A is at index 0 and the bottom row of A is at. index 3. Then, the sub-matrix A obtained by selecting rows from 1 to 2 and columns from 1 to 3 is given below. AA=11010010002202002000330300300044040040005505005000=(202003030040400) Write a program that reads a matrix of 'double' values with n rows and m columns from the input. The first two values in the input are the positive integers n and m. Following are nm fractional values for the entries of the matrix. The entries are listed in the input row by row. The last four values in the input are the positive integers r,r+,c,c+, representing the smallest row index, the largest row index, the smallest column index, and the largest column index of the sub-matrix, respectively. For sub-matrix A above, r=1,r+=2,c=1,c+=3. Your program then outputs the sum of the entries in the sub-matrix identified by integers r,r+,c,c+. You may assume that the values for r,r+,c,c+are valid. Do not write any messages before reading your input. Design your output like in the example below. Input: Output: Input: Output:.

Important This programming assigument is for ALL the students, those who subscribed to
zyBooks and those who did not. It contains one problem. - Submit your source code on Moodle.
You must name your source file as follows: - For write your code in a file named a5submat.ce -
Use source file templatef.cc from the files provided on Moodle to start your program. - The
problem is marked out of 10 points. 2 Programming problem P1: A matrix is a two dimensional
vector (or a vector of vectors). See https://en.wikipedia.org/ wiki/Matrix_(mathenatics) for a
definition. A sub-matrix A of a matrix A is a matrix obtained by retaining elements of A that
belong to a subset of rows and columns of A. We consider the rows and columns of A identified
by their index. For example, suppose matrix A is a 45 matrix. The leftmost column of A is at
index 0 . The rightmost column of A is at index 4. The top row of A is at index 0 and the bottom
row of A is at. index 3. Then, the sub-matrix A obtained by selecting rows from 1 to 2 and
columns from 1 to 3 is given below.
AA=11010010002202002000330300300044040040005505005000=(202003030040400) Write a
program that reads a matrix of 'double' values with n rows and m columns from the input. The
first two values in the input are the positive integers n and m. Following are nm fractional values
for the entries of the matrix. The entries are listed in the input row by row. The last four values in
the input are the positive integers r,r+,c,c+, representing the smallest row index, the largest row
index, the smallest column index, and the largest column index of the sub-matrix, respectively.
For sub-matrix A above, r=1,r+=2,c=1,c+=3. Your program then outputs the sum of the entries
in the sub-matrix identified by integers r,r+,c,c+. You may assume that the values for r,r+,c,c+are
valid. Do not write any messages before reading your input. Design your output like in the
example below. Input:
Output: Input: Output:

Recomendados

SPL 12.1 | Multi Dimensional(Two) Array Practice Problems por
SPL 12.1 | Multi Dimensional(Two) Array Practice ProblemsSPL 12.1 | Multi Dimensional(Two) Array Practice Problems
SPL 12.1 | Multi Dimensional(Two) Array Practice ProblemsMohammad Imam Hossain
116 visualizações13 slides
Mmt 001 por
Mmt 001Mmt 001
Mmt 001sujatam8
508 visualizações6 slides
C programming session 05 por
C programming session 05C programming session 05
C programming session 05Vivek Singh
397 visualizações31 slides
Lab6: I/O and Arrays por
Lab6: I/O and ArraysLab6: I/O and Arrays
Lab6: I/O and Arraysenidcruz
343 visualizações3 slides
A02 por
A02A02
A02lksoo
283 visualizações2 slides
ch9.ppt por
ch9.pptch9.ppt
ch9.pptvalerie5142000
16 visualizações63 slides

Mais conteúdo relacionado

Similar a Important This programming assigument is for ALL the students, those .pdf

Write a function called float dotproduct (links to an external site.)(float a... por
Write a function called float dotproduct (links to an external site.)(float a...Write a function called float dotproduct (links to an external site.)(float a...
Write a function called float dotproduct (links to an external site.)(float a...JenniferBall48
70 visualizações5 slides
Array sheet por
Array sheet Array sheet
Array sheet Mahmoud Abuelmagd
284 visualizações2 slides
MATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulink por
MATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulinkMATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulink
MATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulinkreddyprasad reddyvari
1.9K visualizações55 slides
This should be solved in the matrix.cpp file. Write a program which .docx por
 This should be solved in the matrix.cpp file.  Write a program which .docx This should be solved in the matrix.cpp file.  Write a program which .docx
This should be solved in the matrix.cpp file. Write a program which .docxKomlin1
2 visualizações4 slides
Digital communication lab lectures por
Digital communication lab  lecturesDigital communication lab  lectures
Digital communication lab lecturesmarwaeng
75 visualizações24 slides
Project management por
Project managementProject management
Project managementAvay Minni
1K visualizações32 slides

Similar a Important This programming assigument is for ALL the students, those .pdf(20)

Write a function called float dotproduct (links to an external site.)(float a... por JenniferBall48
Write a function called float dotproduct (links to an external site.)(float a...Write a function called float dotproduct (links to an external site.)(float a...
Write a function called float dotproduct (links to an external site.)(float a...
JenniferBall4870 visualizações
Array sheet por Mahmoud Abuelmagd
Array sheet Array sheet
Array sheet
Mahmoud Abuelmagd284 visualizações
MATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulink por reddyprasad reddyvari
MATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulinkMATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulink
MATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulink
reddyprasad reddyvari1.9K visualizações
This should be solved in the matrix.cpp file. Write a program which .docx por Komlin1
 This should be solved in the matrix.cpp file.  Write a program which .docx This should be solved in the matrix.cpp file.  Write a program which .docx
This should be solved in the matrix.cpp file. Write a program which .docx
Komlin12 visualizações
Digital communication lab lectures por marwaeng
Digital communication lab  lecturesDigital communication lab  lectures
Digital communication lab lectures
marwaeng75 visualizações
Project management por Avay Minni
Project managementProject management
Project management
Avay Minni1K visualizações
C UNIT-3 PREPARED BY M V B REDDY por Rajeshkumar Reddy
C UNIT-3 PREPARED BY M V B REDDYC UNIT-3 PREPARED BY M V B REDDY
C UNIT-3 PREPARED BY M V B REDDY
Rajeshkumar Reddy388 visualizações
1 linear algebra matrices por AmanSaeed11
1 linear algebra matrices1 linear algebra matrices
1 linear algebra matrices
AmanSaeed11344 visualizações
Basics of matlab por Anil Maurya
Basics of matlabBasics of matlab
Basics of matlab
Anil Maurya1.4K visualizações
9781423902096_PPT_ch09.ppt por LokeshK66
9781423902096_PPT_ch09.ppt9781423902096_PPT_ch09.ppt
9781423902096_PPT_ch09.ppt
LokeshK666 visualizações
Two dimensional array por Rajendran
Two dimensional arrayTwo dimensional array
Two dimensional array
Rajendran 1.1K visualizações
C programming session 04 por Dushmanta Nath
C programming session 04C programming session 04
C programming session 04
Dushmanta Nath1.4K visualizações
[removed]DevelopingTechnical Software As.docx por lanagore871
[removed]DevelopingTechnical Software As.docx[removed]DevelopingTechnical Software As.docx
[removed]DevelopingTechnical Software As.docx
lanagore8713 visualizações
Problem 1 Diamonds Dataset In Problem 1 you will be work.pdf por admin447081
 Problem 1 Diamonds Dataset In Problem 1 you will be work.pdf Problem 1 Diamonds Dataset In Problem 1 you will be work.pdf
Problem 1 Diamonds Dataset In Problem 1 you will be work.pdf
admin4470816 visualizações
Practical java por nirmit
Practical javaPractical java
Practical java
nirmit3.4K visualizações
Matlab por Maria Akther
MatlabMatlab
Matlab
Maria Akther629 visualizações
matrix-algebra-for-engineers (1).pdf por ShafaqMehmood2
matrix-algebra-for-engineers (1).pdfmatrix-algebra-for-engineers (1).pdf
matrix-algebra-for-engineers (1).pdf
ShafaqMehmood213 visualizações
CBSE Class 12 Computer Science(083) Sample Question Paper 2020-21 por chinthala Vijaya Kumar
CBSE Class 12 Computer Science(083) Sample Question Paper 2020-21CBSE Class 12 Computer Science(083) Sample Question Paper 2020-21
CBSE Class 12 Computer Science(083) Sample Question Paper 2020-21
chinthala Vijaya Kumar4.2K visualizações
A modified method for solving the unbalanced assignment problems.pdf por Carrie Cox
A modified method for solving the unbalanced assignment problems.pdfA modified method for solving the unbalanced assignment problems.pdf
A modified method for solving the unbalanced assignment problems.pdf
Carrie Cox2 visualizações

Mais de watchamirpune

In a binomial situation, q=1p. True False.pdf por
 In a binomial situation, q=1p. True False.pdf In a binomial situation, q=1p. True False.pdf
In a binomial situation, q=1p. True False.pdfwatchamirpune
4 visualizações1 slide
In 2068, the per capita conaumptice of soft drinks in Coundry A was r.pdf por
 In 2068, the per capita conaumptice of soft drinks in Coundry A was r.pdf In 2068, the per capita conaumptice of soft drinks in Coundry A was r.pdf
In 2068, the per capita conaumptice of soft drinks in Coundry A was r.pdfwatchamirpune
3 visualizações1 slide
In 2025, the Robinson Company switched its inventory method from FIFO.pdf por
 In 2025, the Robinson Company switched its inventory method from FIFO.pdf In 2025, the Robinson Company switched its inventory method from FIFO.pdf
In 2025, the Robinson Company switched its inventory method from FIFO.pdfwatchamirpune
3 visualizações1 slide
In 2022. Jasmine and Thomias, a married couple, had taxable income of.pdf por
 In 2022. Jasmine and Thomias, a married couple, had taxable income of.pdf In 2022. Jasmine and Thomias, a married couple, had taxable income of.pdf
In 2022. Jasmine and Thomias, a married couple, had taxable income of.pdfwatchamirpune
3 visualizações1 slide
In 2022, Jasmine and Thomas, a married couple, had taxable income.pdf por
 In 2022, Jasmine and Thomas, a married couple, had taxable income.pdf In 2022, Jasmine and Thomas, a married couple, had taxable income.pdf
In 2022, Jasmine and Thomas, a married couple, had taxable income.pdfwatchamirpune
2 visualizações1 slide
In 2022, Zach is single with no dependents. He is not claimed as a de.pdf por
 In 2022, Zach is single with no dependents. He is not claimed as a de.pdf In 2022, Zach is single with no dependents. He is not claimed as a de.pdf
In 2022, Zach is single with no dependents. He is not claimed as a de.pdfwatchamirpune
4 visualizações1 slide

Mais de watchamirpune(20)

In a binomial situation, q=1p. True False.pdf por watchamirpune
 In a binomial situation, q=1p. True False.pdf In a binomial situation, q=1p. True False.pdf
In a binomial situation, q=1p. True False.pdf
watchamirpune4 visualizações
In 2068, the per capita conaumptice of soft drinks in Coundry A was r.pdf por watchamirpune
 In 2068, the per capita conaumptice of soft drinks in Coundry A was r.pdf In 2068, the per capita conaumptice of soft drinks in Coundry A was r.pdf
In 2068, the per capita conaumptice of soft drinks in Coundry A was r.pdf
watchamirpune3 visualizações
In 2025, the Robinson Company switched its inventory method from FIFO.pdf por watchamirpune
 In 2025, the Robinson Company switched its inventory method from FIFO.pdf In 2025, the Robinson Company switched its inventory method from FIFO.pdf
In 2025, the Robinson Company switched its inventory method from FIFO.pdf
watchamirpune3 visualizações
In 2022. Jasmine and Thomias, a married couple, had taxable income of.pdf por watchamirpune
 In 2022. Jasmine and Thomias, a married couple, had taxable income of.pdf In 2022. Jasmine and Thomias, a married couple, had taxable income of.pdf
In 2022. Jasmine and Thomias, a married couple, had taxable income of.pdf
watchamirpune3 visualizações
In 2022, Jasmine and Thomas, a married couple, had taxable income.pdf por watchamirpune
 In 2022, Jasmine and Thomas, a married couple, had taxable income.pdf In 2022, Jasmine and Thomas, a married couple, had taxable income.pdf
In 2022, Jasmine and Thomas, a married couple, had taxable income.pdf
watchamirpune2 visualizações
In 2022, Zach is single with no dependents. He is not claimed as a de.pdf por watchamirpune
 In 2022, Zach is single with no dependents. He is not claimed as a de.pdf In 2022, Zach is single with no dependents. He is not claimed as a de.pdf
In 2022, Zach is single with no dependents. He is not claimed as a de.pdf
watchamirpune4 visualizações
In 1945, an omganizalion asked 1400 randomly sampled American chicens.pdf por watchamirpune
 In 1945, an omganizalion asked 1400 randomly sampled American chicens.pdf In 1945, an omganizalion asked 1400 randomly sampled American chicens.pdf
In 1945, an omganizalion asked 1400 randomly sampled American chicens.pdf
watchamirpune2 visualizações
In .pdf por watchamirpune
 In .pdf In .pdf
In .pdf
watchamirpune2 visualizações
Imperial Jewelers manufactures and sells a gold bracelet for $406.pdf por watchamirpune
 Imperial Jewelers manufactures and sells a gold bracelet for $406.pdf Imperial Jewelers manufactures and sells a gold bracelet for $406.pdf
Imperial Jewelers manufactures and sells a gold bracelet for $406.pdf
watchamirpune21 visualizações
Important Notes - This is an individual assignment. - I will be chec.pdf por watchamirpune
 Important Notes - This is an individual assignment. - I will be chec.pdf Important Notes - This is an individual assignment. - I will be chec.pdf
Important Notes - This is an individual assignment. - I will be chec.pdf
watchamirpune9 visualizações
Implement a number parser. The function should take a string represen.pdf por watchamirpune
 Implement a number parser. The function should take a string represen.pdf Implement a number parser. The function should take a string represen.pdf
Implement a number parser. The function should take a string represen.pdf
watchamirpune3 visualizações
Imperial Jevelers manufactures and sells a gold bracelet for $405.00..pdf por watchamirpune
 Imperial Jevelers manufactures and sells a gold bracelet for $405.00..pdf Imperial Jevelers manufactures and sells a gold bracelet for $405.00..pdf
Imperial Jevelers manufactures and sells a gold bracelet for $405.00..pdf
watchamirpune4 visualizações
Imagine that weve defined the following two-dimensional import numpy.pdf por watchamirpune
 Imagine that weve defined the following two-dimensional import numpy.pdf Imagine that weve defined the following two-dimensional import numpy.pdf
Imagine that weve defined the following two-dimensional import numpy.pdf
watchamirpune2 visualizações
In Arabidopsis, you look at three closely linked traits on chromosome.pdf por watchamirpune
 In Arabidopsis, you look at three closely linked traits on chromosome.pdf In Arabidopsis, you look at three closely linked traits on chromosome.pdf
In Arabidopsis, you look at three closely linked traits on chromosome.pdf
watchamirpune2 visualizações
In an independent random sarmple of 107 sophomores, 88 responded that.pdf por watchamirpune
 In an independent random sarmple of 107 sophomores, 88 responded that.pdf In an independent random sarmple of 107 sophomores, 88 responded that.pdf
In an independent random sarmple of 107 sophomores, 88 responded that.pdf
watchamirpune3 visualizações
In 1930, the U.S. government attempted to help domestic firms that we.pdf por watchamirpune
 In 1930, the U.S. government attempted to help domestic firms that we.pdf In 1930, the U.S. government attempted to help domestic firms that we.pdf
In 1930, the U.S. government attempted to help domestic firms that we.pdf
watchamirpune5 visualizações
Imagina que est�s trabajando en el departamento de marketing de una.pdf por watchamirpune
 Imagina que est�s trabajando en el departamento de marketing de una.pdf Imagina que est�s trabajando en el departamento de marketing de una.pdf
Imagina que est�s trabajando en el departamento de marketing de una.pdf
watchamirpune3 visualizações
Ilso the infnrmation in the fnllnwinn table to calculate M2 A. R75 0.pdf por watchamirpune
 Ilso the infnrmation in the fnllnwinn table to calculate M2 A. R75 0.pdf Ilso the infnrmation in the fnllnwinn table to calculate M2 A. R75 0.pdf
Ilso the infnrmation in the fnllnwinn table to calculate M2 A. R75 0.pdf
watchamirpune3 visualizações
In 2001, the Fed pursued an expansionary monetary policy and reduced .pdf por watchamirpune
 In 2001, the Fed pursued an expansionary monetary policy and reduced .pdf In 2001, the Fed pursued an expansionary monetary policy and reduced .pdf
In 2001, the Fed pursued an expansionary monetary policy and reduced .pdf
watchamirpune2 visualizações
import requests from bs4 import Beauttfutsoup import csv With open (.pdf por watchamirpune
 import requests from bs4 import Beauttfutsoup import csv With open (.pdf import requests from bs4 import Beauttfutsoup import csv With open (.pdf
import requests from bs4 import Beauttfutsoup import csv With open (.pdf
watchamirpune3 visualizações

Último

12.5.23 Poverty and Precarity.pptx por
12.5.23 Poverty and Precarity.pptx12.5.23 Poverty and Precarity.pptx
12.5.23 Poverty and Precarity.pptxmary850239
162 visualizações30 slides
MUET Newsletter Vol-IX, Issue-III, 2023 por
MUET Newsletter Vol-IX, Issue-III, 2023MUET Newsletter Vol-IX, Issue-III, 2023
MUET Newsletter Vol-IX, Issue-III, 2023Mehran University of Engineering & Technology, Jamshoro
67 visualizações16 slides
UNIDAD 3 6º C.MEDIO.pptx por
UNIDAD 3 6º C.MEDIO.pptxUNIDAD 3 6º C.MEDIO.pptx
UNIDAD 3 6º C.MEDIO.pptxMarcosRodriguezUcedo
145 visualizações32 slides
Thanksgiving!.pdf por
Thanksgiving!.pdfThanksgiving!.pdf
Thanksgiving!.pdfEnglishCEIPdeSigeiro
461 visualizações17 slides
MIXING OF PHARMACEUTICALS.pptx por
MIXING OF PHARMACEUTICALS.pptxMIXING OF PHARMACEUTICALS.pptx
MIXING OF PHARMACEUTICALS.pptxAnupkumar Sharma
117 visualizações35 slides
INT-244 Topic 6b Confucianism por
INT-244 Topic 6b ConfucianismINT-244 Topic 6b Confucianism
INT-244 Topic 6b ConfucianismS Meyer
44 visualizações77 slides

Último(20)

12.5.23 Poverty and Precarity.pptx por mary850239
12.5.23 Poverty and Precarity.pptx12.5.23 Poverty and Precarity.pptx
12.5.23 Poverty and Precarity.pptx
mary850239162 visualizações
UNIDAD 3 6º C.MEDIO.pptx por MarcosRodriguezUcedo
UNIDAD 3 6º C.MEDIO.pptxUNIDAD 3 6º C.MEDIO.pptx
UNIDAD 3 6º C.MEDIO.pptx
MarcosRodriguezUcedo145 visualizações
MIXING OF PHARMACEUTICALS.pptx por Anupkumar Sharma
MIXING OF PHARMACEUTICALS.pptxMIXING OF PHARMACEUTICALS.pptx
MIXING OF PHARMACEUTICALS.pptx
Anupkumar Sharma117 visualizações
INT-244 Topic 6b Confucianism por S Meyer
INT-244 Topic 6b ConfucianismINT-244 Topic 6b Confucianism
INT-244 Topic 6b Confucianism
S Meyer44 visualizações
Monthly Information Session for MV Asterix (November) por Esquimalt MFRC
Monthly Information Session for MV Asterix (November)Monthly Information Session for MV Asterix (November)
Monthly Information Session for MV Asterix (November)
Esquimalt MFRC98 visualizações
Creative Restart 2023: Leonard Savage - The Permanent Brief: Unearthing unobv... por Taste
Creative Restart 2023: Leonard Savage - The Permanent Brief: Unearthing unobv...Creative Restart 2023: Leonard Savage - The Permanent Brief: Unearthing unobv...
Creative Restart 2023: Leonard Savage - The Permanent Brief: Unearthing unobv...
Taste53 visualizações
Education of marginalized and socially disadvantages segments.pptx por GarimaBhati5
Education of marginalized and socially disadvantages segments.pptxEducation of marginalized and socially disadvantages segments.pptx
Education of marginalized and socially disadvantages segments.pptx
GarimaBhati540 visualizações
Jibachha publishing Textbook.docx por DrJibachhaSahVetphys
Jibachha publishing Textbook.docxJibachha publishing Textbook.docx
Jibachha publishing Textbook.docx
DrJibachhaSahVetphys54 visualizações
Berry country.pdf por MariaKenney3
Berry country.pdfBerry country.pdf
Berry country.pdf
MariaKenney361 visualizações
DISTILLATION.pptx por Anupkumar Sharma
DISTILLATION.pptxDISTILLATION.pptx
DISTILLATION.pptx
Anupkumar Sharma57 visualizações
MercerJesse2.1Doc.pdf por jessemercerail
MercerJesse2.1Doc.pdfMercerJesse2.1Doc.pdf
MercerJesse2.1Doc.pdf
jessemercerail301 visualizações
Creative Restart 2023: Atila Martins - Craft: A Necessity, Not a Choice por Taste
Creative Restart 2023: Atila Martins - Craft: A Necessity, Not a ChoiceCreative Restart 2023: Atila Martins - Craft: A Necessity, Not a Choice
Creative Restart 2023: Atila Martins - Craft: A Necessity, Not a Choice
Taste41 visualizações
Create a Structure in VBNet.pptx por Breach_P
Create a Structure in VBNet.pptxCreate a Structure in VBNet.pptx
Create a Structure in VBNet.pptx
Breach_P82 visualizações
The Future of Micro-credentials: Is Small Really Beautiful? por Mark Brown
The Future of Micro-credentials:  Is Small Really Beautiful?The Future of Micro-credentials:  Is Small Really Beautiful?
The Future of Micro-credentials: Is Small Really Beautiful?
Mark Brown48 visualizações
Gross Anatomy of the Liver por obaje godwin sunday
Gross Anatomy of the LiverGross Anatomy of the Liver
Gross Anatomy of the Liver
obaje godwin sunday74 visualizações
ANGULARJS.pdf por ArthyR3
ANGULARJS.pdfANGULARJS.pdf
ANGULARJS.pdf
ArthyR349 visualizações
JQUERY.pdf por ArthyR3
JQUERY.pdfJQUERY.pdf
JQUERY.pdf
ArthyR3103 visualizações

Important This programming assigument is for ALL the students, those .pdf

  • 1. Important This programming assigument is for ALL the students, those who subscribed to zyBooks and those who did not. It contains one problem. - Submit your source code on Moodle. You must name your source file as follows: - For write your code in a file named a5submat.ce - Use source file templatef.cc from the files provided on Moodle to start your program. - The problem is marked out of 10 points. 2 Programming problem P1: A matrix is a two dimensional vector (or a vector of vectors). See https://en.wikipedia.org/ wiki/Matrix_(mathenatics) for a definition. A sub-matrix A of a matrix A is a matrix obtained by retaining elements of A that belong to a subset of rows and columns of A. We consider the rows and columns of A identified by their index. For example, suppose matrix A is a 45 matrix. The leftmost column of A is at index 0 . The rightmost column of A is at index 4. The top row of A is at index 0 and the bottom row of A is at. index 3. Then, the sub-matrix A obtained by selecting rows from 1 to 2 and columns from 1 to 3 is given below. AA=11010010002202002000330300300044040040005505005000=(202003030040400) Write a program that reads a matrix of 'double' values with n rows and m columns from the input. The first two values in the input are the positive integers n and m. Following are nm fractional values for the entries of the matrix. The entries are listed in the input row by row. The last four values in the input are the positive integers r,r+,c,c+, representing the smallest row index, the largest row index, the smallest column index, and the largest column index of the sub-matrix, respectively. For sub-matrix A above, r=1,r+=2,c=1,c+=3. Your program then outputs the sum of the entries in the sub-matrix identified by integers r,r+,c,c+. You may assume that the values for r,r+,c,c+are valid. Do not write any messages before reading your input. Design your output like in the example below. Input: Output: Input: Output: