Ask your own question, for FREE!
Computer Science 7 Online
OpenStudy (anonymous):

#include #include void main() { int bin,p,q,r,x; clrscr(); bin=1; q=0; printf("Rows you want to input:"); scanf("%d",&r); printf("\nPascal's Triangle:\n"); while(q0;--p) printf(" "); for(x=0;x<=q;++x) { if((x==0)||(q==0)) bin=1; else bin=(bin*(q-x+1))/x; printf("%6d",bin); } printf("\n"); ++q; } getch(); } Can anyone help me to understand this program to print pascal triangle?

OpenStudy (anonymous):

the pascals triangle looks as in a.txt and the alternative pgm is attached in pascal .txt pascals trianlge takes the form nCr=n!/[(n-r)!r!]

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!