# Array of recommended books r = [ "Jane Eyre by Charlotte Bronte", "The Portrait of Dorian Grey by Oscar Wilde", "The Awakening by Kate Chopin", "Heart of Darkness by Joseph Conrad", "Things Fall Apart by Chinua Achebe", "Walden by Henry David Thoreau", "Pride and Prejudice by Jane Austin", "A Room of One's Own by Virginia Woolf", "To Have and Have Not by Ernest Hemingway", "Republic by Plato"] # Pick first random index. index1 = 0 + rand(10) # Assign first recommendation. @rec1 = r[index1] # Pick first random index. index2 = 0 + rand(10) # Assign second recommendation. @rec2 = r[index2] # Print recommendations. puts @rec1 puts @rec2