Hello! I have to print patterns using '*' and I am at a loss how to get these patterns printed!
I figured out the first one,
*
**
***
****
*****
******
*******
********
*********
**********
and now i have to do it upside down:
**********
*********
********
*******
******
*****
****
***
**
*
and backwards:
**********
_*********
__********
___*******
____******
_____*****
______****
_______***
________**
_________*
and
_________*
________**
_______***
______****
_____*****
____******
___*******
__********
_*********
**********
this is the code i have for the first one:
for (int i =0; i < 10; i++) { for (int j=0; j < i+1; j++) { System.out.print('*'); } System.out.println(); }
and I figured if I just changed the numbers around and made i go from 10 to zero it would print out but it is not working. any help??? please!!
Thanks!