fork download
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3. #include<time.h>
  4.  
  5. #define SIZE 3
  6.  
  7.  
  8. int main(void){
  9.  
  10. srand((unsigned)time(NULL));
  11.  
  12. int count;
  13. int x,y;
  14. int rand_x,rand_y;
  15. int Board[SIZE][SIZE];
  16.  
  17. for(int i=0;i<3;i++){
  18. for(int j=0;j<3;j++){
  19. Board[i][j] = 9;
  20. }
  21. }
  22.  
  23. for(int i=0;i<3;i++){
  24. printf("----------\n");
  25. for(int j=0;j<3;j++){
  26. printf("[%d]",Board[i][j]);
  27. }
  28. printf("\n");
  29. }
  30. printf("----------");
  31.  
  32. for(int i=0;i<3;i++){
  33. for(int j=0;j<3;j++){
  34. if(Board[i][j]==9){
  35. printf("[\t]");
  36. }
  37. }
  38. }
  39.  
  40. }
Success #stdin #stdout 0.01s 5312KB
stdin
Standard input is empty
stdout
----------
[9][9][9]
----------
[9][9][9]
----------
[9][9][9]
----------[	][	][	][	][	][	][	][	][	]