Advertisement
Guest User

asdsd

a guest
Nov 15th, 2013
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. for(int i = 0; i <= 8; i++)
  2. for(int j = 0; j <= 8; j++)
  3. war=r.nextInt( 8 )+1;
  4.  
  5.  
  6. if
  7. (
  8.  
  9.  
  10.  
  11. ---kwadrat 3x3---
  12. |(int a = 0; a <= 2; a++) |
  13. | (int b = 0; b <= 2; b++)| // pierwszy warunek ifa
  14. | tablica [a][b]=!war; |
  15.  
  16.  
  17. &&
  18.  
  19. ---wiersz od 0 do 9---
  20. | (int c = i; c <= 8; c++) | // drugi war ifa (tez musi byc spelniony)
  21. | int d = j; |
  22. | tablica [i][j]=!war; |
  23.  
  24. &&
  25.  
  26. ---kolumna od 0 do 9---
  27. | (int e = j; e <= 8; e++) |
  28. | int f=i; | // trzeci war ifa (tez musi byc spelniony)
  29. | tablica [i][j]=!war; |
  30.  
  31.  
  32. )
  33.  
  34.  
  35. {
  36. tablica[i][j]=war; //instrukcja ifa
  37. }
  38.  
  39.  
  40.  
  41. return tablica;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement