Two examples of what the output should look like.
User enters 5
Code
0 * *
1 * *
2 *
3 * *
4 * *
User enters 4
Code
0 * *
1 **
2 **
3 * *
What I've written so far (just an outline) (row is obtained from a scanner)
Code
for(int i = 0; i < row; i++)
{
System.out.print(/*?*/);
for(k = 1; k < /*?*/; k++)
{
if(/*?*/)
{
System.out.print("*");
}
else
{
System.out.print(" ");
}
}
System.out.println(""); //Returns after each row printed
I really have no idea how to do this. My code is just an outline so far. Any help is appreciated.
This post was edited by KitsuneYosh on Sep 30 2014 01:06pm