Question: I like a working C code rogram ning Assignment #2, you should write a C program that prints Pascal's Triangle. It should print the first
rogram ning Assignment #2, you should write a C program that prints Pascal's Triangle. It should print the first 15 rows, but must calculate the contents of each row using properties of the triangle (don't just hardwire 15 print statements!). Do not use factorials: calculate each element of a row by adding the two elements above it in the prior row (yes, there are other ways to do this: but you're required to do it using this property). Don't worry about formatting the output: the following is perfectly acceptable: 1 21 1331 14641 1 5 10 10 51 1 6 15 20 15 61 1 7 21 35 35 2171 18 28 56 70 56 28 81 19 36 84 126 126 84 36 91 1 10 45 120 210 252 210 120 45 10 1 1 11 55 165 330 462 462 330 165 55 111 1 12 66 220 495 792 924 792 495 220 66 12 1 1 13 78 286 715 1287 1716 1716 1287 7152 1 14 91 364 286 78 13 1 1001 2002 3003 3432 3003 2002 1001 364 91 14 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
