Computer Science, asked by Anonymous, 1 year ago

Question 6


@Nain31 di ANS kro please

Attachments:

Answers

Answered by garywalter1221
1

void main()

{

int a[10][10],i,j;

for(i=0;i<10;++i)

 {

  printf("\n");

 for(j=0;j<=i;++j)

 {

 if(j==0 || i==j)

 a[i][j]=1;

 else

a[i][j]=a[i-1][j-1]+a[i-1][j];

printf("%4d",a[i][j]);

 }

getch();

 }


garywalter1221: u r welcome
Answered by nain31
2
import Java. up. *;
Class p
{
public static void main(String args[])throws Exception
{
int i,j,l=1;
for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
System. out. println(l);
l=l*11;
}
System. out. println();
}
}
}

Hope it helps
Similar questions