I'd like to try a right triangle asterisk. But I only got this output: (I can't place here the asterisk)
@
@@
@@@
what I want is this:
@
@@
@@@
Here's the code that I programmed:
public class triangles {
public static void main( String[] args ) {
for( int i = 1; i <= 10; i++ ){
for( int j = 0; j < i; j++ ){
System.out.print("*");
}
System.out.println();
}
}
}
Any ideas to share are greatly appreciated. I'm a java newbie. thanks.
See Question&Answers more detail:os