// Scott DeRuiter 10/14/2002 // AsterixTriangle.java // Draws A Triangle of Asterixes. public class AsterixTriangle { public static void main ( String [] args ) { int line, spaces, stars, loop; int n = 30; for ( line = 1; line <= n; line++ ) { spaces = line - 1; for ( loop = 1; loop <= spaces; loop++ ) System.out.print (" "); // print a blank space stars = n - line + 1; for (loop = 1; loop <= stars; loop++) System.out.print ("*"); System.out.println ( ); } } }