/home/caleb/ASDV-Java/Assignments/lab12_CalebFontenot/src/lab12_calebfontenot/NestedWhilePatternD.java |
nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt
nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java
package lab12_calebfontenot;
public class NestedWhilePatternD {
public static void main(String[] args) {
int numberOfLines = 6;
int rows = 1;
int spacing;
int collums;
while (rows <= numberOfLines) {
spacing = numberOfLines - rows;
while (spacing < 6) {
System.out.print(" ");
spacing++;
}
collums = rows;
while (collums <= 6) {
System.out.print((collums - rows + 1) + " ");
collums++;
}
System.out.println();
rows++;
}
}
}