Skip to content

#telusko # navinreddy #10days challenge #4192

@antivirustoai

Description

@antivirustoai

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

No one assigned

    Labels

    awaiting triageAwaiting triage from a maintainer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions