A Simple Ruby Program : Ruby Interpreter « Language Basics « Ruby
- Ruby
- Language Basics
- Ruby Interpreter
A Simple Ruby Program
# This file's name is intro.rb
puts "Hello, world!"
numOfCoins = (10 + 20) * 2 / 3
puts "You have #{numOfCoins} coins."
puts 'You have #{numOfCoins} coins.'
puts 'You have ' + numOfCoins.to_s + ' coins.'
Related examples in the same category