Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int mat[2][3];
- int sum [3];
- int i, j;
- for (i = 0; i < 2; i++){
- for (j = 0; j < 3; j++){
- cout << "mat[" << i << "][" << j << "]=";
- cin >> mat[i][j];
- }
- }
- for (j = 0; j < 3; j++) {
- sum[j] = 0;
- for (i = 0; i < 2; i++){
- cout << mat[i][j] << " ";
- sum[j] = sum[j] + mat[i][j];
- }
- cout << endl;
- }
- for (j = 0; j < 3; j++)
- cout << "sumata ot koloni " << j << " e " << sum[j] << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement