This assignment is to be done individually. You can share ideas and thoughts with other people in the class, but you should write up your own assignment.
Submit your assignment electronically. If you want to write it out on paper, which is likely the easiest way to do it, scan your solution using any of the scanners in the library or elsewhere, and submit. If you prefer, you may also do it using Word or LibreOffice (yechhh, but they work) or learn LaTeX, which lets you produce gorgeously readable mathematical text like this (skip to the third page).
// example a for (int i=0; i < n; i++) { for (int j=0; j < n; j++) { System.out.println(i + " " + j); } } // example b for (int i=0; i < n; i++) { for (int j=0; j < 2; j++) { System.out.println(i + " " + j); } } // example c for (int i=0; i < n; i++) { for (int j=n-1; j >=0; j--) { System.out.println(i + " " + j); } } // example d for (int i=0; i < n; i++) { for (int j=0; j < i; j++) { if (j % i == 0) { System.out.println(i + " " + j); } } }