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.
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:
- Entering the Number for Triangle.
- Using loop Statement.
- Using Control Statement for condition.
- Display output on the Screen.
This C program is successfully compiled and run on a System. Output is shown below.
printf("Please Enter the Number :");
printf("The Pascal Triangle is \n");