Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

pascal triangle program

Answer Posted / azad sable, chiplun

void main()
{
int i,j,k,t,f1,f2,f3,z,sp;
sp=20;
clrscr();
for(i=0;i<=4;i++)
{
for(k=0;k<sp-1;k++)
printf("");
sp=0;
for(j=0;j<=i;j++)
{
f1=f2=f3=1;
t=i;
while(t!=0)
{
f1=f1*t;
t--;
}

t=j;
while(t!=0)
{
f2=f2*t;
t--;
}
t=i-j;

while(t!=0)
{
f3=f3*t;
t--;
}
z=f1/(f2*f3);
printf("%4d",z);
}
printf("\n");
}
getch():
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many types of sorting are there in c?

1027


write a proram to reverse the string using switch case?

2905


Explain what is the use of a semicolon (;) at the end of every program statement?

1203


What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?

1188


Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.

1967


Why main function is special give two reasons?

1507


A text file that contains declarations used by a group of functions,programs,or users a) executable file b) header file c) obj file d) .cfile

1070


What are the different types of errors?

1097


cavium networks written test pattern ..

4046


What is a structure in c language. how to initialise a structure in c?

1038


any restrictions have on the number of 'return' statements that may be present in a function. a) no restriction b) only 2 return statements c) only 1 return statements d) none of the above

1106


What do header files do?

1040


What is the explanation for modular programming?

1168


What is an array? What the different types of arrays in c?

1130


string reverse using recursion

2408