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