fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.  
  6. int tab1[3]={12,2,-4};
  7.  
  8. int tab[3][5]={{1,2,3,4,5},{6,7,8,9,10},{11,12,13,14,15}};
  9.  
  10. //cout << tab[2][1] << endl;
  11.  
  12. for (int j=0; j<3; j++)
  13. {
  14. for (int i=0; i<5; i++)
  15. tab[j][i]=-1;
  16. }
  17.  
  18. for (int j=0; j<3; j++)
  19. {
  20. for (int i=0; i<5; i++)
  21. {
  22. cout << tab[j][i] << " ";
  23. }
  24. cout << endl;
  25. }
  26.  
  27. return 0;
  28. }
Success #stdin #stdout 0.01s 5276KB
stdin
Standard input is empty
stdout
-1 -1 -1 -1 -1 
-1 -1 -1 -1 -1 
-1 -1 -1 -1 -1