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.