by Dinesh Thakur Category: C Programming (Pratical)

In this program to Print the Pascal Triangle Two core concepts will be on the trot. The Control statement (if-else), and Loop Statements. There in the program Integer type Variables declare which use to contain the value. Here variable i,j and Num will use in the Loop statement as according the requirement. As required in the program Nested Loop used for fulfilling the condition along within the control Statement.

In the Program to print Triangle the loop Statement will be used many times like nested Loop Statement. As shown in The Program value entered in condition place and with the if condition used either condition gets true will be print desired row or else part will be followed to print in else condition the calculation will be manipulated for getting the correct output.
Problem Statement:-
Pascal Triangle Which we might have studied in Binomial Theorem here we Print Pascal Triangle. With the use of Loop Statement and Control statement. Write a program to read the data and determine the following:

  1. Entering the Number for Triangle.
  2. Using loop Statement.
  3. Using Control Statement for condition.
  4. Display output on the Screen.

This C program is successfully compiled and run on a System. Output is shown below.

void main()
            int i=1,j,num,x=1;
            printf("Please Enter the Number :");
            printf("The Pascal Triangle is \n");

Print a Pascal Triangle


Related Articles on C Programming

About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.C.A, MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.