Advertisement
Guest User

Untitled

a guest
Jan 19th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.48 KB | None | 0 0
  1. #include <iostream>
  2. #include <time.h>
  3. using namespace std;
  4. int k = 0;
  5. int n = 0;
  6.  
  7. void matriceCasuale (int matrice[k][n] , int righe , int colonne){
  8.  
  9.     for ( int k = 0; k < righe ; k++){
  10.  
  11.         for (int n = 0; n < colonne ; n++){
  12.  
  13.             t = rand() % 10 + 1;
  14.             matrice[k][n] = t;
  15.             cout << matrice[k][n] << " ";
  16.         }
  17.  
  18.         cout << endl;
  19.     }
  20. }
  21.  
  22. int main()
  23. {
  24.     srand(time(NULL));
  25.     int A[k][n];
  26.     int t = 0;
  27.     int k = 0;
  28.     int n = 0;
  29.     matriceCasuale(A[k][n] , 3 , 2);
  30.  
  31.     return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement