Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
32 lines (26 sloc) 767 Bytes
=begin
~\rubylearning\p002rubynumbers.rb
Developer: Dan Chuparkoff (Twitter: @chuparkoff )
Creation Date: 4/13/2012
Initial Ruby Version: Ruby 1.9.3-p125
Initial Development Environment: Windows 7 Home Premium - SP1
Initial Development IDE: Jetbrains RubyMine 4.0.2
This program was created as an exercise in the RubyLearning PORPC101-32C Course.
http://rubylearning.com
This program illustrates the =begin/end style of commenting and also the basic operators in action.
Ruby Numbers
Usual Operators:
+ addition
- subtraction
* multiplication
/ division
=end
puts 1 + 2
puts 2* 3
#Integer Division
#When you do arithmetic with integers, you'll get integer answers.
puts 3 / 2
puts 3 / 2.0
puts 3.0 / 2.0
puts 10 - 11
puts 1.5 / 2.6