fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int arr[4][6];
  6. for (int i=0; i<4; i++){
  7. for (int j=0; j<6; j++){
  8. int x=rand();
  9. arr[i][j]=x%2;
  10. }
  11. }
  12. for (int i=0; i<4; i++){
  13. for (int j=0; j<6; j++){
  14. cout<<arr[i][j]<<" ";
  15. }
  16. cout<<endl;
  17. }
  18. }
Success #stdin #stdout 0s 4388KB
stdin
Standard input is empty
stdout
1 0 1 1 1 1 
0 0 1 1 0 1 
0 1 1 0 0 0 
0 0 1 0 1 1