Created
September 29, 2011 03:57
-
-
Save bennage/1249942 to your computer and use it in GitHub Desktop.
Adah's First Ruby Script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# adah's first program | |
puts 'what is the number to divide?' | |
x=gets.to_i | |
puts 'what do you want to divide it by?' | |
y=gets.to_i | |
puts 'here is the answer.' | |
puts x/y | |
r=x%y | |
if r != 0 then | |
puts 'The remainder is' | |
puts r | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment