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 |
Display names and numbers of employees who have 5 years or more experience and salary less than Rs.15000 using array of structures (name, number, experience and salary)
When was c language developed?
Explain the binary height balanced tree?
what are the advanced features of functions a) function declaration and prototypes b) calling functions by value or by reference c) recursion d) all the above
Explain modulus operator.
in iso what are the common technological language?
What is pivot in c?
What is a example of a variable?
What's wrong with "char *p = malloc(10);" ?
How can I find out how much free space is available on disk?
How can I prevent another program from modifying part of a file that I am modifying?
Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it?