#!/usr/bin/env ruby heure = [Time.now.hour, Time.now.hour - 6] heure[1] = 24 - heure[1] if heure[1] < 0 textes = [] heure.each_index { |i| if (17..23).include?(heure[i]) or (0..5).include?(heure[i]) textes[i] = "bonsoir" else textes[i] = "bonjour" end } puts "Papageno3 mezzo slubman geekounet: #{textes[0]}" puts "christophe971 bodha simonpca: #{textes[1]}"