+ 2
PLEASE HELP: Pascal s triangle+ questions
This is my code for pascal's triangle: https://code.sololearn.com/W1KEH1nivK93/#html .The n-th row has n numbers, the first and the last of which are 1. Any other number x is equal to the sum of the number above x (same column, previous row, y) and the number before y (same row as y but previous column). 1) Is there a more efficient way to create the n first rows of pascal's triangle?? 2) How do I ask the user to give the number n?
0 ответов