emanuele6 / Pascal-Triangle-Simulator

This app generates 'pascal triangles' from a given root

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pascal-Triangle-Simulator

This app generates 'pascal triangles' from a given root

To generate a triangle input reset(root) in the browser console

root is an array that contains the numbers of the root

examples:

#1: reset([0,1,0]) will generate

alt text

#2: reset([0,1,0,0,1,0,1,0,0,1,0]) will generate

alt text

In cases like example #2 you might want to 'cut' the triangle because the values of the rows under the fifth are wrong

To generate and cut the triangle input reset(root, rows)

rows is the number of roots you want to generate

reset([0,1,0,0,1,0,1,0,0,1,0], 4) will generate

alt-text

About

This app generates 'pascal triangles' from a given root

License:MIT License


Languages

Language:JavaScript 83.0%Language:CSS 14.8%Language:HTML 2.2%