Guest User

Untitled

a guest
Dec 11th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.39 KB | None | 0 0
  1. for (int i = 0; i < 4; i++) {
  2.   for (int j = 0; j < 4; j++) {
  3.     if (i % 2 == 0) {             // if i is even
  4.       if (j % 2 == 0)             // and j is even
  5.         plantMany(i, j);                 // plant
  6.     } else {                      // otherwise (if i is odd)
  7.       if (j % 2 == 1)             // and j is odd
  8.         plantMany(i, j);                 // plant
  9.     }
  10.   }
  11. }
Add Comment
Please, Sign In to add comment