Kotlin Program:

- To find Quotient and Remainder

Example:

User Input:
Dividend : 7
Divisor : 5

Output:
Quotient : 1
Remainder : 2

import java.util.Scanner
fun main(args: Array<String>) {

    print("Enter your dividend : ")
    val userInput = Scanner(System.`in`)
    var dividend:Int = userInput.nextInt()
    print("Enter your divisor : ")
    var divisor:Int =userInput.nextInt()

    println("Quotient : "+ dividend/divisor)
    println("Remainder : "+ dividend%divisor)
}

Output:

  Enter your dividend : 7
  Enter your divisor : 2

  Quotient : 3
  Remainder : 1
Program
basic
dividend / divisor // use devision( / ) operator to find quotient
dividend % divisor // use modulus( % ) operator to find remainder

modulus( % ) operator used to find remainder, & devision( / ) operator used to find quotient

Concept

Coming Soon !

Quick
Tutorial

Quote

Sometimes it’s the smallest decisions that can change your life forever.