Sha256: a261f0d611fd2c1d07a204cbdae47c14d2c388fa3cd2367bce87662a3938b520

Contents?: true

Size: 365 Bytes

Versions: 1

Compression:

Stored size: 365 Bytes

Contents

require "mario_tower/version"

#module MarioTower
  # Your code goes here...
  class Tower
    def build_tower
      puts "Input number (number >=2)"
      number = gets.to_i
      if number < 2
        puts "Error"
      else
        i = 1
        i.upto(number) do |i|
          puts ' '*(number-i) + '#'*i + '  ' + '#'*i
        end
      end
    end
  end
#end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mario_tower-0.1.0 lib/mario_tower.rb