Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Created by Vasil on 11/24/2017.
- */
- public class square {
- public static void main(String[] args) {
- int leftPartStart = 1;
- int rightPartEnd = 0;
- for (int row = 0; row <= 9; row++) {
- for (int col = leftPartStart; col <= 9; col++) {
- System.out.print(col + " ");
- }
- for (int col = 0; col <= rightPartEnd; col++) {
- System.out.print(col + " ");
- }
- System.out.println();
- leftPartStart++;
- rightPartEnd++;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement