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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!