Triangular num b ers are integers of the form n n 1 2


Triangular num b ers are integers of the form n ( n + 1) / 2. The term comes from the fact that a triangular grid with n points on a side has a total of n ( n + 1) / 2 points. Write a function trinums(m) that generates all the triangular numbers less than or equal to m. Modify primespiral to use your trinums and become trinumspiral.

Solution Preview :

Prepared by a verified Expert
Mathematics: Triangular num b ers are integers of the form n n 1 2
Reference No:- TGS01180720

Now Priced at $10 (50% Discount)

Recommended (98%)

Rated (4.3/5)