fork download
  1. #include <iostream>
  2.  
  3. int main()
  4. {
  5. for(int y=0,blank=0;y<4;++y,std::cout<<"\n") for(int x=0;x<4;++x,++blank) std::cout<<((((blank>>2)^blank)&1)?" B":" Z");
  6. return 0;
  7. }
Success #stdin #stdout 0s 2896KB
stdin
Standard input is empty
stdout
 Z B Z B
 B Z B Z
 Z B Z B
 B Z B Z