Newbie @ Ruby on Rails: Code Question

Discussion in 'Ruby' started by 1mak, Jun 29, 2009.

  1. #1
    hi,
    i wanted to signup an account at a ruby-forum but can not answer the signup-questions which requires ruby-knowledge. (http://www.ruby-forum.com)

    can somebody please help me ...

    The Question:

    What does the following ruby code print out?
    puts (('11' * 2).to_i/2)
     
    1mak, Jun 29, 2009 IP
  2. 1mak

    1mak Well-Known Member

    Messages:
    302
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    108
    #2
    1mak, Jul 3, 2009 IP
  3. thietkelogo

    thietkelogo Greenhorn

    Messages:
    88
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #3
    Yes, the correct code is 555
     
    thietkelogo, May 27, 2012 IP
  4. satria.sjagad

    satria.sjagad Greenhorn

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #4
    Ha ha haha.... :) http://bendamustika.com

    its good....:p
     
    satria.sjagad, Mar 31, 2013 IP