Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <stdio.h>
- using namespace std;
- void nhapMaTran (int arrBegin[3][3], int arrRoll[3][3])
- {
- int value = 0;
- for(int i = 0; i < 3; i ++)
- {
- for(int j = 0; j < 3; j++)
- {
- cout << "nhap vao phan tu o vi tri thu:" << i << "/" << j << endl;
- cin >> value;
- arrBegin[i][j] = value;
- arrRoll[j][2-i] = value;
- }
- }
- }
- void xuatMaTran (int arr[3][3])
- {
- for(int i = 0; i < 3; i ++)
- {
- for(int j = 0; j < 3; j++)
- {
- cout << arr[i][j] << " ";
- }
- cout << endl;
- }
- }
- int main(){
- int arrBegin[3][3],arrRoll[3][3];
- nhapMaTran(arrBegin,arrRoll);
- cout << endl;
- xuatMaTran(arrBegin);
- cout << endl;
- xuatMaTran(arrRoll);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement