Can anyone help me with Pentagon pattern | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can anyone help me with Pentagon pattern

Using loops

5th Dec 2018, 2:50 PM
aasthasavla
aasthasavla - avatar
3 Answers
+ 5
If you want regular convex polygons take a look here (math documentation at bottom of js tab): https://code.sololearn.com/WjZChqY4vZXO/?ref=app
6th Dec 2018, 5:17 AM
Haris
Haris - avatar
+ 2
Satnam Singh 👑 I didn't see any comment in the link you shared that showed how to print a console-based pentagon.
5th Dec 2018, 4:24 PM
Kishalaya Saha
Kishalaya Saha - avatar
+ 2
aasthasavla if you don't need a regular pentagon (that is, if you don't have to have all sides of the same length and all angles of the same measure), then just print a triangle on top of a square.
6th Dec 2018, 3:59 AM
Kishalaya Saha
Kishalaya Saha - avatar