answersLogoWhite

0

long factorial(int); int main() { int i, n, c; printf("Enter the number of rows you wish to see in pascal triangle\n"); scanf("%d",&n); for ( i = 0 ; i < n ; i++ ) { for ( c = 0 ; c <= ( n - i - 2 ) ; c++ ) printf(" "); for( c = 0 ; c <= i ; c++ ) printf("%ld ",factorial(i)/(factorial(c)*factorial(i-c))); printf("\n"); } return 0; } long factorial(int n) { int c; long result = 1; for( c = 1 ; c <= n ; c++ ) result = result*c; return ( result ); }

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

What is logic and switching theory?

what is logic circuits and switching theory? how can it help us in our daily needs


What has the author Thomas Downs written?

Thomas Downing has written: 'The catechisers holy encouragement to the profitable exercise of catechising in the Church of England' -- subject(s): Catechisms, English, Church of England, English Catechisms


Need of program Logic controllers?

Program logic controllers are used to control the operation of most systems.


A sentence for logic?

Logic is a theory of reasoning. An example sentence would be: According to his logic, it was alright to lie.


What is the logic of in triangle in C-programming?

Your question is ambiguous.


What has the author Arthur D Friedman written?

Arthur D. Friedman has written: 'Fundamentals of logic design and switching theory' -- subject(s): Logic circuits, Logic design, Switching theory


What is the theory in math that uses the words IF and THEN?

Logic.


What has the author Georg Kreisel written?

Georg Kreisel has written: 'Elements of mathematical logic (Model theory)' -- subject(s): Symbolic and mathematical Logic 'Elements of mathematical logic' -- subject(s): Symbolic and mathematical Logic 'Modelltheorie' -- subject(s): Model theory


What is the difference between a Theory and a Logic?

A theory is an explanation based on evidence and reasoning to describe a phenomenon, while logic is the principles of reasoning and inference used to make sense of information and draw conclusions. Theories are used to understand and explain the world, while logic is the systematic approach to ensuring the validity of arguments and reasoning.


What is the importance of set theory in math?

It develops the power to apply logic and logic in an integral part of mathematics.


What is program logic?

Snarled program logic is unstructured logic, also known as "spaghetti" logic. Compiled machine code is the ultimate example of snarled program logic. Although spaghetti code is more compact and efficient than structured code, it is extremely difficult to both comprehend and maintain. Hence we use structured programming languages to provide a high level of abstraction between the logic of the programmer and the snarled logic of the machine-dependant code.


What has the author John T Kearns written?

John T. Kearns has written: 'Reconceiving experience' -- subject(s): Experience, Knowledge, Theory of, Language and languages, Language and logic, Philosophy, Theory of Knowledge 'The principles of deductive logic' -- subject(s): Language and logic, Logic