fork download
  1. #include <cstdio>
  2. #include <iostream>
  3. #include <cstdlib>
  4. using namespace std;
  5.  
  6. int main(){
  7.  
  8. int n=10, m=10;
  9.  
  10. int width, height;
  11. char **tab = new char*[n];
  12. for (int x = 0; x < n; x++) {
  13. tab[x] = new char[m];
  14. }
  15.  
  16.  
  17.  
  18.  
  19. for(int i=0;i<n;i++)
  20. for(int j=0;j<m;j++)
  21. tab[i][j] = rand()%10 + '0';
  22.  
  23.  
  24. for (int i=0; i<n; i++) { for(int j=0; j<n; j++) cout << tab[i][j]; cout << endl; }
  25. cout << endl;
  26.  
  27. cout << tab[5];
  28.  
  29.  
  30.  
  31. return 0;
  32. }
Success #stdin #stdout 0s 3472KB
stdin
Standard input is empty
stdout
3675356291
2709360626
1879202375
9228973612
9319478450
3610632061
5547656937
4525474430
7868843149
2068926649

3610632061