+ 6
Challenge: Create Pascal's triangle (mathematical object)
Output to the screen a working figure of the triangle. Any suitable language 1) Pascal's pattern is generated from the top of the pyramid ie first row 2) Starting with number 1, then 11 seperated by a space as in (1 " ") ,followed that by square of 11 then the cube, etc. /* triangle is a perfectly symmetrical mirror image having a line down through the middle innermost digits */ 3) Bonus if can link the algebraic format for handling each row with expression as 'x' or 'a'
6 Réponses
+ 20
//like this
https://code.sololearn.com/c5g3Qt9Lqt5e/?ref=app
+ 19
https://code.sololearn.com/csPsjUnODw2J/?ref=app
+ 9
As pointed out, this has been asked before. However, it gives me a chance to show off a Kotlin version.
https://code.sololearn.com/c1jIarDM1zmp
https://code.sololearn.com/cxmf2HsD1VY3
+ 4
Time to promote my code!
https://code.sololearn.com/Ww9YwjOjJ97W/?ref=app
+ 3
https://code.sololearn.com/cR3cD5I9SiY8/?ref=app