fork(2) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.  
  6. const int j=3;
  7. int arr[5][j] = {0};
  8.  
  9. int dx = 0;
  10. for (int g = 0; g < j; g++) {
  11. for (int t = 0; t < 5; t++) {
  12. arr[t][g]=1;
  13. }
  14. dx=g;
  15.  
  16. for (int d = 0; d <5; d++) {
  17. for (int n = 0; n < j; n++) {
  18. cout << arr[d][n] << " ";
  19. }
  20. cout << endl;
  21. }
  22. cout << endl;
  23. }
  24. return 0;
  25. }
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
1 0 0 
1 0 0 
1 0 0 
1 0 0 
1 0 0 

1 1 0 
1 1 0 
1 1 0 
1 1 0 
1 1 0 

1 1 1 
1 1 1 
1 1 1 
1 1 1 
1 1 1