Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- const int n = 4;
- int main()
- {
- string M[n];
- int A[n][n] = {10,5,7,6,
- 8,6,4,9,
- 2,11,9,3,
- 8,15,12,17};
- /*
- for(int i = 0; i < n; i++){
- //cout << endl;
- for(int j = 0; j < n; j++){
- //cout << A[i][j];
- }
- }*/
- for(int i = 0; i < 4; i++){
- for (int j = 0; j < 4; j++){
- if(i==j){
- //cout << A[i][j] << " ";
- if(A[i][j] > 8) M[i] = "D";
- else M[i] = "M";
- }
- }
- }
- for(int i = 0; i < n; i++){
- cout << M[i];
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement