103
Program to print the following pattern (pascal triangle)
Algorithm
- Start
- Let i be an integer number.
- Let j be an integer number.
- Let row be an integer number and initialize by 6.
- Let coe be an integer number and initialize by 0.
- Repeat step 7 to 14 until all value parsed.
- Set i = 0 and check I <= row;
- Set j = 1 and check j <= row-i;
- Print space.
- check if j==0 || i==0
- set coe = 1;
- Else
- Set coe = coe * (i+j-1)/j;
- Print coe.
- End
JAVA
Python
C program
C# program
PHP Program
Next TopicProgram to Print pattern 16