Created
February 15, 2021 13:55
-
-
Save abircse/0d208d978f0485fa18269dff11c9b084 to your computer and use it in GitHub Desktop.
CalculateDiscountExtension
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
object CalculateDiscount { | |
fun discountInPercentage(totalprice: Int, discount: Int) : Int | |
{ | |
val discountInTk = totalprice * discount / 100 | |
val result = totalprice - discountInTk | |
return result | |
} | |
fun discountInTaka(context: Context, totalprice: Int, taka: Int) : Int | |
{ | |
val result = totalprice - taka | |
return result | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment