Horje
compound interest formula kotlin Code Example
compound interest formula kotlin
import java.util.*

//Main Function , Entry point of Program
fun main(args: Array<String>) {

    //Input Stream
    val scanner = Scanner(System.`in`)

    //Input Amount
    print("Enter Principal Amount : ")
    val principalAmount = scanner.nextDouble()

    //Input Interest Rate
    print("Enter Rate of Interest : ")
    val rateOfInterest = scanner.nextDouble()

    //Input time in years
    print("Enter Time : ")
    val time = scanner.nextDouble()

    //Calculate Compound Interest
    val compoundInterest = principalAmount.toDouble() * Math.pow((1 + rateOfInterest.toDouble()/100.00),time.toDouble())

    //Print Compound Interest
    println("Compound Interest is :$compoundInterest")
}




Whatever

Related
invert color recyclerview android kotlin Code Example invert color recyclerview android kotlin Code Example
what does <> mean in swl Code Example what does <> mean in swl Code Example
melon client download Code Example melon client download Code Example
Hello Kitty Code Example Hello Kitty Code Example
latex tilde Code Example latex tilde Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8