Posted By

justariuss on 10/30/10


Tagged


Versions (?)

off by 1 :(


 / Published in: C++
 

  1. #include <iostream>
  2. #include <fstream>
  3. #include <cstdlib>
  4. using namespace std;
  5.  
  6. int const CSIZE = 5;
  7. int const RSIZE = 5;
  8.  
  9. int main()
  10. {
  11. char board[CSIZE][RSIZE];
  12.  
  13. for(int i = 0; i < CSIZE - 1; i++)
  14. for(int j = 0; j < RSIZE - 1; j++)
  15. board[i][j] = '*';
  16.  
  17. for(int i = 0; i < RSIZE; i++)
  18. {
  19. cout << board[0][i];
  20. for(int j = 0; j < CSIZE; j++)
  21. cout << board[j][0];
  22. cout << endl;
  23. }
  24.  
  25.  
  26.  
  27. return 0;
  28. }

Report this snippet  

You need to login to post a comment.