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.
Default arguments
Gratuity
Report a typo
Write a program in Kotlin
fun tip(bill: Int, percentage: Int): Int {
// TODO
}
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.