Abatoor

Untitled

Nov 30th, 2020
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.53 KB | None | 0 0
  1. #include <iostream>
  2. #include <time.h>
  3.  
  4. int main()
  5. {
  6.     setlocale(LC_ALL, "Rus");
  7.     const int n = 100;
  8.     int Matrix[n][n];
  9.     for (int i = 0; i < n; i++)
  10.     {
  11.         std::cout << std::endl;
  12.         for (int j = 0; j < n; j++)
  13.         {
  14.             if (i == j)
  15.                 Matrix[i][j] = 1;
  16.             else
  17.                 if (i > j)
  18.                     Matrix[i][j] = 0;
  19.                 else
  20.                     Matrix[i][j] = i + j;
  21.             std::cout << Matrix[i][j] << "\t";
  22.  
  23.  
  24.         }
  25.     }
  26. }
  27.  
Advertisement
Add Comment
Please, Sign In to add comment