Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // sum to calc sum of first column
- #include<iostream.h>
- #include<conio.h>
- #include<stdio.h>
- void main()
- {
- clrscr();
- int a[3][3];
- int sum=0;
- cout<<"enter the nos: ";
- for( int i=0;i<3;i++)
- {
- for(int j=0;j<3;j++)
- {
- cin>>a[i][j];
- }
- }
- for(int x=0;x<3;x++)
- {
- sum=a[x][0]+sum;
- }
- cout<<"sum is:"<<sum;
- getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement