-
Notifications
You must be signed in to change notification settings - Fork 0
/
exo_07.rb
21 lines (18 loc) · 957 Bytes
/
exo_07.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
animal = ["abeille 🐝" , "baleine 🐋" , "canard 🦆" , "chat 🐈" , "cheval 🐴" , "chien 🐕" , "éléphant 🐘" , "girafe 🦒" , "grenouille 🐸" , "lapin 🐇" , "lion 🦁" , "loup 🐺" , "ours 🐻" , "renard 🦊" , "singe 🐒" , "souris 🐭" , "vache 🐄" , "zèbre 🦓"]
animals = ["abeilles 🐝" , "baleines 🐋" , "canards 🦆" , "chats 🐈" , "chevaux 🐴" , "chiens 🐕" , "éléphants 🐘" , "girafes 🦒" , "grenouilles 🐸" , "lapins 🐇" , "lions 🦁" , "loups 🐺" , "ours 🐻" , "renards 🦊" , "singes 🐒" , "souris 🐭" , "vaches 🐄", "zèbres 🦓"]
counter = 1
puts "Saisis un nombre (pas trop grand sinon c'est chiant)."
print "> "
nb = gets.chomp.to_i
while counter <= nb
if counter == 1
puts " "
puts "#{counter} #{animal.sample}"
counter = counter + 1
end
puts "#{counter} #{animals.sample}"
counter = counter + 1
end
puts " "
puts "Mon zoo est immense ! 😎"
puts " "