fork(1) download
  1. #include <iostream>
  2.  
  3. void printboard(char board[5][5])
  4. {
  5.  
  6. for(int n=0;n<5;n++) {
  7. for(int m=0;m<5;m++) {
  8. std::cout << board[n][m];
  9. }
  10. std::cout << std::endl;
  11. }
  12. }
  13.  
  14. int main()
  15. {
  16. char board[5][5] = {{' ','|',' ','|',' '},
  17. {'-','-','-','-','-'},
  18. {' ','|',' ','|',' '},
  19. {'-','-','-','-','-'},
  20. {' ','|',' ','|',' '}};
  21. printboard(board);
  22. }
Success #stdin #stdout 0s 2852KB
stdin
Standard input is empty
stdout
 | | 
-----
 | | 
-----
 | |