sparda795 / sparda

first
0 stars 4 forks source link

Merge pull request #1 from nymphsparda/main #hacktoberfest #13

Closed nymphsparda closed 3 years ago

nymphsparda commented 3 years ago

hacktoberfest #startpattern

public class RightTrianglePattern
{
public static void main(String args[])
{
//i for rows and j for columns
//row denotes the number of rows you want to print
int i, j, row=6;
//outer loop for rows
for(i=0; i<row; i++)
{
//inner loop for columns
for(j=0; j<=i; j++)
{
//prints stars
System.out.print("* ");
}
//throws the cursor in a new line after printing each line
System.out.println();
}
}
}