Ok so i am trying to make a simple program run this
**********
*********
********
*******
******
*****
****
***
**
*
ok but all the asteriks are alligned on the right side, like a right triangle.
so far i have this
public class exercise5c{
public static void main(String args[])
{
for(int row=1;row<=10;row++)
{
for (int ast=1;ast<=row;ast++)
System.out.print(' ');
System.out.print('*');
System.out.println();
}
System.exit(0);
}
}
and that produces this but diagonal to the right and down.
*
*
*
*
*
*
*
*
*
*
*
what am i doing wrong? i can't figure it out. thanks
**********
*********
********
*******
******
*****
****
***
**
*
ok but all the asteriks are alligned on the right side, like a right triangle.
so far i have this
public class exercise5c{
public static void main(String args[])
{
for(int row=1;row<=10;row++)
{
for (int ast=1;ast<=row;ast++)
System.out.print(' ');
System.out.print('*');
System.out.println();
}
System.exit(0);
}
}
and that produces this but diagonal to the right and down.
*
*
*
*
*
*
*
*
*
*
*
what am i doing wrong? i can't figure it out. thanks