Gratuity

Report a typo

Create a function called tip that calculates the tip. The function has two parameters bill and percentage and returns the amount of tip. The tip size varies greatly from country to country, so 10% of the total amount of a customer’s check is a more or less universal solution. So, if the percentage is not specified, set it at 10. Return only the integer part of gratuity.

Write a program in Kotlin
fun tip(bill: Int, percentage: Int): Int {
// TODO
}
___

Create a free account to access the full topic