This tutorial will show you how to reverse a number in Kotlin. We will learn two different ways to do that. The first method will use one loop and the second method will use a different approach to solve it. This program will take the number as an input from the user, calculate the reverse and print it to the user.
Readif-else is used in almost all programming languages. These are basic control statements and we can control the programming flow based on a condition. Similar to any other programming language, we can use if-else in kotlin with a condition. In kotlin, we can also use if-else as an expression i.e. if-else returns a value!
Readtake() method is defined in Kotlin standard library. This method can be used with an array or iterable. In this tutorial, we will learn how to use take method in kotlin with example. The program will show you how take works on arrays with a different data type.
ReadKotlin standard library comes with a lot of different functions derived under different packages. For example, if we want to find out the largest of two or three numbers in Kotlin, we can either write our own comparison function or use the one that is provided under the standard library.
ReadIn this kotlin programming tutorial, we will learn how to calculate simple interest by using the user provided values.The user will enter the values and the program will calculate the simple interest.
ReadIn this kotlin programming tutorial, we will learn how to check if a substring exists in another string or not. The program will take the strings as input from the user and print out the result.
ReadIn this Kotlin programming tutorial, we will learn how to find out the largest number among the three. The user will enter the number values, our program will find and print out the result.
ReadThis kotlin program is to show you how we can access a character in a string using index position. The program will take one string as input from the user. Next, it will take the index position. The output of the program will be the character at that user defined index position in the string.We will learn two different ways to solve this program.
ReadIn this kotlin programming tutorial, we will learn how to print each character of a string in kotlin. The program will take the string as input from the user and print out all characters of it one by one.
ReadIn this kotlin programming tutorial, we will learn how to reverse a string recursively in kotlin. The program will take the string from the user and reverse it.We will use one separate method and call it recursively to reverse the string.
Read