How to print pascal's triangle in java
Answers
Answered by
0
Answer:
by clicking c++ it will sure correct
Answered by
0
Answer:
Algorithm.
- Take a number of rows to be printed, n. Make outer iteration I for n times to print rows. Make inner iteration for J to (N - 1). Print single blank space " ". Close inner loop. Make inner iteration for J to I. Print nCr of I and J. Close inner loop. Print NEWLINE character after each inner iteration.
Similar questions