1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
Answer / guest
#include<conio.h>
#include<stdio.h>
void main()
{
int a[10],b[10];
int c=1,n=5;
a[0]=0;a[1]=1;a[2]=0;
b[0]=0;
printf("Enter no. of rows to print ");
scanf("%d",&n);
for(int i=0;i<n;i++)
{
for(int j=n-2;j<0;j++)
printf(" ");
c++;
for(int k=0;k<c;k++)
{
b[k+1]=a[k]+a[k+1];
}
b[c]=0;
for(int k=1;k<=i+1;k++)
{
printf("%d ",a[k]);
}
printf("\n");
for(int k=0;k<i+3;k++)
a[k]=b[k];
}
getch();
}
Is This Answer Correct ? | 0 Yes | 0 No |
Why is c known as a mother language?
What is the default value of local and global variables in c?
How can I do serial ("comm") port I/O?
what is structuer?
what is pointer?
Explain in detail how strset (string handling function works )pls explain it with an example.
Should a function contain a return statement if it does not return a value?
FILE *fp1,*fp2; fp1=fopen("one","w") fp2=fopen("one","w") fputc('A',fp1) fputc('B',fp2) fclose(fp1) fclose(fp2)} a.error b. c. d.
Hi, main() { } Is a user defined function or Built in Functionn
develop algorithms to add polynomials (i) in one variable
What is meant by recursion?
Difference between fopen() and open()?