Tutorial by Examples

One of the most interesting Number Patterns is Pascal's Triangle. The Name "Pascal's Triangle" named after Blaise Pascal, a famous French Mathematician and Philosopher. In Mathematics, Pascal's Triangle is a triangular array of binomial coefficients.The rows of Pascal's triangle are conve...
public class PascalsTriangle { static void PascalTriangle(int n) { for (int line = 1; line <= n; line++) { int c = 1; for (int i = 1; i <= line; i++) { Console.WriteLine(c); c = c * (line - i)...
int i, space, rows, k=0, count = 0, count1 = 0; row=5; for(i=1; i<=rows; ++i) { for(space=1; space <= rows-i; ++space) { printf(" "); ++count; } while(k != 2*i-1) { if (count <= rows-1) { printf("...

Page 1 of 1