class Pyramid
Public Instance Methods
right()
click to toggle source
# File lib/pyramid_gem.rb, line 2 def right puts "Enter any number between 1 to 9" n = gets.chomp.to_i if ((1..9).include?(n)) puts n.times { |i| puts ('* ' * (i+1)) } else puts "Wrong input :(" end end