I need to create code that will make a triangle look like V
*********
*******
*****
***
**
*
using ( ' ' ) to produce x number of spaces before displaying the asterisks. my code for my working Triangle is
Expand|Select|Wrap|Line Numbers
- public class Triangle
- {
- public static void main( String[] args ) {
- for( int x=0; x<=10; x++ )
- {
- for( int y=10; y>=x; y-- ) {
- System.out.print( "*" );
- }
- System.out.println( "" );
- }
- }
- }