Sie sind auf Seite 1von 1

using b=System.

Console;
class Pascal
{
public static void Main()
{
int [,]a=new int[10,10];
for(int i=0;i<=6;i++)
{
for(int j=0;j<=i;j++)
{
if(j==0)
{
a[i,j]=1;
b.Write("{0}\t",a[i,j]);
}
else
{
a[i,j]=a[i-1,j-1]+a[i-1,j];
b.Write("{0}\t",a[i,j]);
}
}
b.WriteLine("");
}
}
}

Das könnte Ihnen auch gefallen