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 |
how to swap two integers 1 and 32767 without using third variable
main() { charx; while (x=0;x<=255;x++) printf("\nAscii value %d Character %c,x,x); }
What is a global variable in c?
What is spaghetti programming?
Explain Doubly Linked Lists?
Write a c program to sort six numbers and find the largest one by using the ladder of if-else? plz do help me
write a program of palindrome(madam=madam) using pointer?
differnce between do and do while
Why c is called object oriented language?
Where are some collections of useful code fragments and examples?
What is your favorite subject?
1 Answers Ericsson, Invendis, Tech Mahindra,
what is the difference between call by value and call by reference?
5 Answers Genpact, Global Logic, Infosys,