Advertisement
askarulytarlan

рандомная матрица

Oct 30th, 2016
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. #include <cmath>
  4. #include <math.h>
  5. #include <cstdlib>
  6. #include <ctime>
  7.  
  8.  
  9. using namespace std;
  10.  
  11. int n;
  12. int a[100];
  13.  
  14. int main() {
  15.  
  16. cin >> n;
  17. srand(time(0));
  18. for(int i = 1; i <= n; i++){
  19. for(int j = 1; j <= n; j++){
  20. cout << rand() % 10 << " ";
  21. }
  22. cout<<endl;
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement