Ruby program to find largest of two numbers
Filed in General on Jan.29, 2009
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # Ruby program to find biggest of two numbers puts("Enter first number:"); a = gets.to_f puts("Enter first number:"); b = gets.to_f if (a > b) then puts("#{a} is big") else puts("#{b} is big") end |
Related posts:























Leave a Reply
You must be logged in to post a comment.