Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for(int i = 0; i <= 8; i++)
- for(int j = 0; j <= 8; j++)
- war=r.nextInt( 8 )+1;
- if
- (
- ---kwadrat 3x3---
- |(int a = 0; a <= 2; a++) |
- | (int b = 0; b <= 2; b++)| // pierwszy warunek ifa
- | tablica [a][b]=!war; |
- &&
- ---wiersz od 0 do 9---
- | (int c = i; c <= 8; c++) | // drugi war ifa (tez musi byc spelniony)
- | int d = j; |
- | tablica [i][j]=!war; |
- &&
- ---kolumna od 0 do 9---
- | (int e = j; e <= 8; e++) |
- | int f=i; | // trzeci war ifa (tez musi byc spelniony)
- | tablica [i][j]=!war; |
- )
- {
- tablica[i][j]=war; //instrukcja ifa
- }
- return tablica;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement