Pattern Printing
Problem Statement
Given a positive integer N, your task is to print a right angle triangle pattern of consecutive numbers of height N.
static void pattern(int n){
for(int i=1;i<=n;i++)
{
for(int j=1;j<=i;j++)
System.out.print(j+" ");
System.out.println("");
}
}