Jump to content


Photo

CHALLENGE : Floyd's Triangle


  • Please log in to reply
5 replies to this topic

#1 AlexZ

AlexZ

    elite

  • Members
  • 114 posts
  • Country:
  • Gender:Male

Posted 08 March 2010 - 08:49 AM

Create a program in what language you want, which create this triangle of number :
1
2 3
4 5 6
7 8 9 10
11 12 13 14 15

If you haven't understood the problem, you can follow the explaination on wikipedia of this particular triangle!!!
Here i link my solution, don't look at that before you've written yours program!! :p

Edited by AlexZ, 08 March 2010 - 08:49 AM.


#2 Ouroboros

Ouroboros

    SCRiPT KiDDie

  • Members
  • 22 posts
  • Gender:Male
  • Location:The Internet

Posted 16 August 2010 - 01:10 PM

Heres my solution in python
Spoiler


#3 n3xg3n

n3xg3n

    "I Hack, therefore, I am"

  • Members
  • 960 posts
  • Country:
  • Gender:Male
  • Location:(703)

Posted 16 August 2010 - 03:51 PM

Ruby solution

Spoiler


#4 PurpleJesus

PurpleJesus

    Dangerous free thinker

  • Members
  • 1,578 posts
  • Gender:Male
  • Location:800

Posted 16 August 2010 - 04:38 PM

How did I miss this one??

Here's mine in C
Spoiler


#5 Lord Wud

Lord Wud

    SUPR3M3 31337 Mack Daddy P1MP

  • Members
  • 423 posts
  • Location:New Jersey

Posted 13 September 2010 - 02:08 PM

Heres my solution in python

Spoiler


This is much better then mine, but here is how i did it.
Spoiler

Edited by Lord Wud, 13 September 2010 - 02:09 PM.


#6 heisenbug

heisenbug

    Gibson Hacker

  • Members
  • 79 posts
  • Country:
  • Gender:Male

Posted 06 February 2011 - 02:37 AM

Perl solution
Spoiler





BinRev is hosted by the great people at Lunarpages!