@christinaSmith/

Calculate_age_ruby

Ruby

No description

fork
loading
Files
  • main.rb

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.8568928955378248","path":"main.rb","file":{"path":"main.rb","content":{"asEncoding":{"base64":"cHV0cyAiV2hhdCB5ZWFyIHdlcmUgeW91IGJvcm4/Igp5ZWFyID0gZ2V0cy50b19pCgpkZWYgY2FsY3VsYXRlX2FnZSh5ZWFyKQogICAgYWdlID0gMjAxOCAtIHllYXIKICAgIHJldHVybiBhZ2UKZW5kCgp5b3VyX2FnZSA9IGNhbGN1bGF0ZV9hZ2UoeWVhcikKCnB1dHMgIllvdSBhcmUgI3t5b3VyX2FnZX0iCg=="},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
puts "What year were you born?"
year = gets.to_i

def calculate_age(year)
    age = 2018 - year
    return age
end

your_age = calculate_age(year)

puts "You are #{your_age}"
ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-linux]