# Edabit challenge "Convert Age to Days"
# in Ruby
# trying a new language...
def ageToDays(years)
return years * 365
end
def test(n)
puts "An age of " + n.to_s + " has passed " + ageToDays(n).to_s + " days."
end
test(1)
test(3)
test(5)
test(10)
test(89)
test(130)
Subscribe to:
Post Comments (Atom)
Coding Challenge #54 C++ int to std::string (no stringstream or to_string())
Gets a string from an integer (ejemplo gratis: 123 -> "123") Wanted to come up with my own function for this like 10 years ago ...
-
I NEEDS MY JAVASCRIPT PLEASE :) Open txtcode .txt Save as .gct Please click the blue cheat code title to activate it, a...
-
Naruto Personality Quiz Please enable javascript ☯ Which Naruto Character Are You?
-
Useful for extensions that want to prevent event listeners from being attached or modify prototypes or functions, generally to defeat click...
No comments:
Post a Comment