-
Notifications
You must be signed in to change notification settings - Fork 20.8k
Closed
Labels
awaiting triageAwaiting triage from a maintainerAwaiting triage from a maintainer
Description
What would you like to share?
public class Pascalstriangle
{
public static void main(String[] args)
{
int n = 7;
for(int i=0;i<n;i++)
{
for(int j=0;j<=i;j++)
{
System.out.print(arry(i,j)+" ");
}
System.out.println();
}
}
public static int arry(int row, int col)
{
if (col==0||col==row)
{
return 1;
}
else
{
return arry(row-1,col-1)+arry(row-1,col);
}
}
}
Additional information
No response
Metadata
Metadata
Assignees
Labels
awaiting triageAwaiting triage from a maintainerAwaiting triage from a maintainer