Skip to content

Instantly share code, notes, and snippets.

@abircse
Created February 15, 2021 13:55
Show Gist options
  • Save abircse/0d208d978f0485fa18269dff11c9b084 to your computer and use it in GitHub Desktop.
Save abircse/0d208d978f0485fa18269dff11c9b084 to your computer and use it in GitHub Desktop.
CalculateDiscountExtension
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