67 245
Assignments Done
99,2%
Successfully Done
In November 2018

Answer to Question #20935 in C++ for apoorva

Question #20935
write a c++ program to get the value of 2 D array from the user having 3 rows and 3 columns and display its row and column sum
Expert's answer
#include <iostream>

using namespace std;

int main()
{


int a[3][3],i,j;
int s=0;
for (i=0;i<3;i++) {

for (j=1;j<3;j++) {
cin>>a[i][j];

s=a[i][j]+s;
}}

cout<<"sum= "<<s;


return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions