Last active
June 8, 2018 05:45
-
-
Save sajjadyousefnia/76840e1f99d455e825078b17e1e1f9b9 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
fun printCircumferenceAndArea(radius: Double): Unit { | |
fun calCircumference(radius:Double)= (2 * Math.PI) * radius | |
val circumference = "%.2f".format(calCircumference()) | |
fun calArea(radius:Double)= (Math.PI) * Math.pow(radius, 2.0) | |
val area = "%.2f".format(calArea()) | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment