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