Write a code using Ruby ‚Äč:

Programming
Tutor: None Selected Time limit: 1 Day

Write a code using Ruby :

Create a program which generates a random number (1 - 100) by looking into rubydoc.org and using that rondom number, find if the number is lucky number(77).if you get a lucky number, then print that you are winner if not, try again.

Oct 2nd, 2015

Thank you for the opportunity to help you with your question!

x=rand(0..100)

if x==77

puts "you are winner"

else

puts "try again"

Please let me know if you need any clarification. I'm always happy to answer your questions.
Oct 4th, 2015

Did you know? You can earn $20 for every friend you invite to Studypool!
Click here to
Refer a Friend
...
Oct 2nd, 2015
...
Oct 2nd, 2015
Dec 11th, 2016
check_circle
Mark as Final Answer
check_circle
Unmark as Final Answer
check_circle
Final Answer

Secure Information

Content will be erased after question is completed.

check_circle
Final Answer