Question
Write Kotlin program with two functions (in addition to the default main function). 1. The first function should take one parameter of type String and
Write Kotlin program with two functions (in addition to the default main function).
1. The first function should take one parameter of type String and return a reversed version of the input string. For example if the input string is "Kotlin" the function should return "niltoK"
2. The second function should take three parameters. The first two should be integeres and the third should be of type boolean. If the value of the boolean parameter is true the function should return the larger of the two input integers, if the value of the boolean parameter is false the function should return the smaller of the two input integers (in the case the integer values are equal you can return either of them).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started