fork download
  1. #include <iostream>
  2. using namespace std;
  3. #include <vector>
  4. #include <string.h>
  5.  
  6. int main(){
  7.  
  8. char score[10][10] = {};
  9. for (int i = 0; i < 10; i ++) {
  10. for (int j = 0; j < 10; j++) {
  11. score[i][j] = 'x';
  12. }
  13. }
  14.  
  15. cout<< " a b c d e f g h i j"<< endl;
  16. cout <<" +-------------------+"<< endl;
  17. for (int i = 0; i < 10; i++) {
  18. cout << " " << i << "|" << score[i][0];
  19. for (int j = 1; j < 10; j++) {
  20. cout << " " << score[i][j];
  21. }
  22. cout << "|" << endl;
  23. }
  24. cout <<" +-------------------+"<< endl;
  25.  
  26. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
   a b c d e f g h i j
  +-------------------+
 0|x x x x x x x x x x|
 1|x x x x x x x x x x|
 2|x x x x x x x x x x|
 3|x x x x x x x x x x|
 4|x x x x x x x x x x|
 5|x x x x x x x x x x|
 6|x x x x x x x x x x|
 7|x x x x x x x x x x|
 8|x x x x x x x x x x|
 9|x x x x x x x x x x|
  +-------------------+