// third nested for loop ... diagonal line public class Nested3 { public static void main( String[] args ) { int rows, columns; for (rows=1; rows<=5; rows++) { for (columns=1; columns < rows; columns++) { System.out.print(" "); } System.out.print("*\n"); } System.out.print("\n"); System.exit( 0 ); } // end main } // end of program