Created
December 3, 2013 12:22
-
-
Save utkumalkocoglu/7768342 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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