Kotlin example for Beginners – Kotlin Program to Display Prime Numbers Between Intervals Using Function

Hits: 1 Kotlin Program to Display Prime Numbers Between Intervals Using Function In this program, you’ll learn to display all prime numbers between the given intervals using a function in Kotlin. To find all prime numbers between two integers, checkPrimeNumber() function is created.   Example: Prime Numbers Between Two Integers fun main(args: Array<String>) { var low …

Kotlin example for Beginners – Kotlin Program to Display Armstrong Number Between Two Intervals

Hits: 0 Kotlin Program to Display Armstrong Number Between Two Intervals In this program, you’ll learn to display all armstrong numbers between two given intervals, low and high, in Kotlin. A positive integer is called an Armstrong number of order n if abcd… = an + bn + cn + dn + … In case of an …

Kotlin example for Beginners – Kotlin Program to Display Prime Numbers Between Two Intervals

Hits: 6 Kotlin Program to Display Prime Numbers Between Two Intervals In this program, you’ll learn to display prime numbers between two given intervals, low and high. You’ll learn to do this using a while and a for loop in Kotlin. Example: Display Prime Numbers Between two Intervals fun main(args: Array<String>) { var low = …

Kotlin example for Beginners – Kotlin Program to Display Characters from A to Z using loop

Hits: 0 Kotlin Program to Display Characters from A to Z using loop In this program, you’ll learn to print English alphabets using while loop in Kotlin. You’ll also learn learn to print only uppercased and lowercased alphabets. Example 1: Display Uppercased A to Z fun main(args: Array<String>) { var c: Char c = ‘A’ …

Kotlin example for Beginners – Kotlin Program to Generate Multiplication Table

Hits: 0 Kotlin Program to Generate Multiplication Table In this program, you’ll learn to generate multiplication table of a given number. This is done by using a for and a while loop in Kotlin. You’ll also learn to use ranges to solve the problem. Example 1: Generate Multiplication Table using for loop fun main(args: Array<String>) …

Kotlin example for Beginners – Kotlin Program to Check Whether a Character is Alphabet or Not

Hits: 0 Kotlin Program to Check Whether a Character is Alphabet or Not In this program, you’ll learn to check whether a given character is an alphabet or not. This is done using an if else statement or when expression in Kotlin. Example 1: Kotlin Program to Check Alphabet using if else fun main(args: Array<String>) …

Kotlin example for Beginners – Kotlin Program to Check Whether an Alphabet is Vowel or Consonant

Hits: 0 Kotlin Program to Check Whether an Alphabet is Vowel or Consonant In this program, you’ll learn to check whether an alphabet is a vowel or a consotant using if..else and when statement in Kotlin. Example 1: Check whether an alphabet is vowel or consonant using if..else statement fun main(args: Array<String>) { val ch …