SHARE
TWEET

Untitled

a guest Dec 3rd, 2019 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <ctime>
  3. #include <iomanip>
  4. using namespace std;
  5. int
  6. main ()
  7. {
  8.   srand (time (NULL));
  9.   int n;
  10.   int max = 0;
  11.   int arr[100][100];
  12.   int arrB[100][100];
  13.   cout << "Enter n: ";
  14.   cin >> n;
  15.   cout << "Matrix A: " << endl;
  16.   for (int i = 0; i < n; i++)
  17.     {
  18.       for (int j = 0; j < n; j++)
  19.     {
  20.       arr[i][j] = rand () % 40;
  21.       cout << setw (4) << arr[i][j] << " ";
  22.  
  23.     }
  24.     }
  25.   for (int i = 0; i < n; i++)
  26.     {
  27.       for (int j = 0; j < n; j++)
  28.     {
  29.       for (int k = 0; k < n; k++)
  30.         {
  31.           for (int z = 0; z < n; z++)
  32.         {
  33.         if(k>=i;k<=n-1-i;z)
  34.  
  35.         }
  36.         }
  37.       cout << "\n";
  38.     }
  39.     }
  40.   return 0;
  41. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top