Skip to content

Instantly share code, notes, and snippets.

View jcolebot's full-sized avatar

Jonathan "JC" Coley jcolebot

View GitHub Profile
@quackhouse
quackhouse / calculator.rb
Created September 25, 2013 14:36
Ruby Calculator
def getNumbers(workingArray)
# Method to take multiple integers as input from user.
puts "Please enter the numbers you'd like me to use. Type 'done' when you're finished."
nextnum = 0
# Creates nextnum as variable.
while nextnum != "done"
nextnum = gets.chomp!
if nextnum == "done"
puts "Calculating!"
elsif nextnum != "0" && nextnum.to_i == 0