Skip to content

Instantly share code, notes, and snippets.

@mathieubrunpicard
Last active October 2, 2018 15:25
Show Gist options
  • Save mathieubrunpicard/4a1bc48d68cb2a6bd80ff7c61802b60c to your computer and use it in GitHub Desktop.
Save mathieubrunpicard/4a1bc48d68cb2a6bd80ff7c61802b60c to your computer and use it in GitHub Desktop.
def number_asker
p "Salut, bienvenue dans ma super pyramide ! Combien d'étages veux-tu ?"
gets.chomp.to_i
end
def building_pyramid(floor)
p 'Voici la pyramide :'
floor.times { |j| puts '*' * (j + 1) }
end
def perform
building_pyramid(number_asker)
end
perform
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment