PROG. TO PRODUCE 1
1 1
1 2 1
1 3 3 1
1 4 6 4 1

Answer Posted / aadhirai r

#include<stdio.h>
#include<conio.h>

void main()
{
int j=2,n,num,b[20],a[20];
a[0]=1; a[1]=2; a[2]=1;
clrscr();
printf("Enter the no of rows");
scanf("%d",&num);
printf(" 1\n");
printf(" 1 1\n");
printf(" 1 2 1\n");
while(j<=num)
{
int i=0;
b[0]=1;
for(n=1;n<=j;n++)
{
b[n]=a[i]+a[i+1];
i++;
}
b[n]=1;
gotoxy(15-(j),j+3);
for(i=0;i<=n;i++)
{
printf("%d ",b[i]);
a[i]=b[i];
}
j++;
}
getch();
}

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

3) Int Matrix of certain size was given, We had few valu= es in it like this. =97=97=97=97=97=97=97=97=97=97=97 1 = | 4 | | 5 | &= nbsp; | 45 =97=97=97=97=97=97=97=97=97=97=97 &n= bsp; | 3 | 3 | 5 | = | 4 =97=97=97=97=97=97=97=97=97=97=97 34 |&nbs= p; 3 | 3 | | 12 | &= nbsp; =97=97=97=97=97=97=97=97=97=97=97 3 | &nbs= p; | 3 | 4 | = | 3 =97=97=97=97=97=97=97=97=97=97=97 3 | = ; | | | = ; 3 | =97=97=97=97=97=97=97=97=97=97=97 &= nbsp; | | 4 | = ; | 4 | 3 We w= ere supposed to move back all the spaces in it at the end. Note: = If implemented this prog using recursion, would get higher preference.

3317


Can you send Code for Run Length Encoding Of BMP Image in C Language in linux(i.e Compression and Decompression) ?

3845


how to test pierrot divisor

2257


why nlogn is the lower limit of any sort algorithm?

2373


write a c program to input initial & final time in the format hh:mm and find the time intervel between them? Ex inputs are initial 06:30 final 00:05 and 23:22 final 22.30

2219






Write a program to model an exploding firecracker in the xy plane using a particle system

3686


Given a spherical surface, write bump-mapping procedure to generate the bumpy surface of an orange

2859


What is the difference between proc means and proc tabulate ? explain with a simple example when you have to use means or tabulate?

3708


could you please send the program code for multiplying sparse matrix in c????

3067


write a simple calculator c program to perform addition, subtraction, mul and div.

3143


Cluster head selection in Wireless Sensor Network using C programming language.

3107


Set up procedure for generating a wire frame display of a polyhedron with the hidden edges of the object drawn with dashed lines

3026


#include int main(void) { int a=4, b=2; a=b<>2 ; printf("%d",a); return 0; }

1067


Design an implement of the inputs functions for event mode

2959


how to programme using switch statements and fuctions, a programme that will output two even numbers, two odd numbers and two prime numbers of the users chioce.

2136