public class Pattern {
static void pattern(int row,int col,int n)
{
if(n==row)
return;
if(col>row) {
System.out.println();
pattern(row+1,1,n);
return ;
}
pattern(row,col+1,n);
System.out.print("* ");
}
public static void main(String args[])
{
int r=1,c=1;
pattern(r,c,5);
}
}