Skip to content

Instantly share code, notes, and snippets.

@utkumalkocoglu
Created December 3, 2013 12:22
Show Gist options
  • Save utkumalkocoglu/7768342 to your computer and use it in GitHub Desktop.
Save utkumalkocoglu/7768342 to your computer and use it in GitHub Desktop.
class Celcius
def initialize(celcius)
@celcius = celcius
end
def fahrenayt
(@celcius*9/5)+32
end
end
def main
print"sicaklik degerini celius olarak giriniz:"
sicaklik=gets.chomp.to_i
d = Celcius.new(sicaklik)
f=d.fahrenayt
p "sicaklik fahrenayt olarak= #{f}"
end
if __FILE__ == $0
main
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment