Answer to Question #23125 in C++ for jakshil gandhi
Create a two-demensional array of M X N elements. Write a program to find the row wise sum.
1
2013-01-29T07:30:36-0500
#include<iostream>
using namespace std;
&
int main (){
int a[10][4],s=0;
for(int i=0; i<10; i++){
for (int j=0;j<4;j++){
cout<<"Enter a["<<i+1<<","<<j+1<<"] : ";
cin>>a[i][j];
}
& }
&
&
for(int i=0; i<10; i++){
for (int j=0;j<4;j++){
cout<< a[i][j]<<" ";
s+=a[i][j];
}
cout<<"sum:& "<<s<<endl;
s=0;
& }
&
&
system("PAUSE"); &
}
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!
Learn more about our help with Assignments:
C++
Comments
Leave a comment