Created
May 4, 2015 06:37
-
-
Save mikestratton/b2e2d0a7c734dc6ad99f to your computer and use it in GitHub Desktop.
Input 2 numbers from user, perform calculation and print results.
This file contains 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
#!/usr/bin/ruby | |
# Request 2 numbers from user and perform calculation | |
print "Enter value of a: " | |
a = gets | |
print "Enter value of b: " | |
b = gets | |
print " a = " + a | |
print " b = " + b | |
print "b - a + 100 = " , (b.to_i - a.to_i + 100) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment