Question: Use loop in C++ to output the pattern.... Line 1: 1 Line 2: 1 1 Line 3: 1 2 1 Line 4: 1 3 3
Use loop in C++ to output the pattern....
Line 1: 1
Line 2: 1 1
Line 3: 1 2 1
Line 4: 1 3 3 1
Line 5: 1 4 6 4 1
Make sure to have empty space between the numbers; The number in the middle of the line are the sum of the two number above it (2=1+1, 3=1+2). Compute based on logic.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
