Last active
October 2, 2018 15:25
-
-
Save mathieubrunpicard/4a1bc48d68cb2a6bd80ff7c61802b60c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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