-
-
Save avshabanov/5c03f1011b512e618e87 to your computer and use it in GitHub Desktop.
This file contains 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 Ratio(num : Int, denom : Int) { | |
val numerator: Int | |
val denominator: Int | |
{ | |
val theGcd = gcd(num, denom) | |
numerator = num / theGcd | |
denominator = denom / theGcd | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment