Pens

Report a typo

Here is a plurals resource:

<plurals name="pens">
    <item quantity="one">one pen</item>
    <item quantity="other">%d pens</item>
</plurals>

Use the resource to return an appropriate string from the function howManyPens that takes the argument numberOfPens.

You have access to the Resources instance through resources.

Sample Input 1:

1

Sample Output 1:

one pen
Write a program in Kotlin
fun howManyPens(numberOfPens: Int): String {
// Write your code here!

}
___

Create a free account to access the full topic