/home/caleb/ASDV-Java/Semester 3/Assignments/lab5-recursion2_CalebFontenot/src/main/java/edu/slcc/asdv/caleb/lab5/recursion2_calebfontenot/NestedLoopsIndexes.java
/*
 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
 */
package edu.slcc.asdv.caleb.lab5.recursion2_calebfontenot;

/**
 *
 * @author caleb
 */
public class NestedLoopsIndexes {
   static final int ROWS = 3;
   static final int COLUMNS = 5;
    
    public static void nestedLoopsIndexesR(int i, int j) {
        if (j == COLUMNS) {
            System.out.println();
            return;
        } else if (i == ROWS) {
            return;
        }
        System.out.print(i + ", " + j + "    ");
        nestedLoopsIndexesR(i, ++j);
        if (i + 1 == j) {
            nestedLoopsIndexesR(++i, 0);
        }
    }
    public static void main(String[] args)
    {
        nestedLoopsIndexesR(0, 0);
    }
}