Created
August 11, 2012 09:30
-
-
Save omkz/3323050 to your computer and use it in GitHub Desktop.
ruby unless statement
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 | |
x=0 | |
unless x>2 | |
puts "x is less than 2" #dieksekusi karena kondisi salah 0 tidak lebih besar dari 2 | |
else | |
puts "x is greater than 2" | |
end | |
output : | |
is less than 2 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment