日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 默认站点!

默认站点

當前位置: 首頁 >

kotlin 计算平方_Kotlin程序来计算复利

發布時間:2023/12/1 39 豆豆
默认站点 收集整理的這篇文章主要介紹了 kotlin 计算平方_Kotlin程序来计算复利 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

kotlin 計算平方

Compound interest is the sum of principal amount and interest of interest.

復利是本金和利息之和。

Given, principal, rate, and time, we have to calculate the Compound interest.

給定本金,利率和時間,我們必須計算復利。

Formula to calculate Compound interest is: P * (Math.pow(( 1 + R/100), T)

計算復利的公式為:P *(Math.pow((1 + R / 100),T)

Where,

哪里,

  • P is Principal amount.

    P是本金。

  • R is rate of interest per annum.

    R是每年的利率。

  • T is time in years.

    T是以年為單位的時間。

Example:

例:

Input:P = 5000R = 12T = 5Output:Compound Interest = 8811.708416000003

計算Kotlin復利的程序 (Program to calculate Compound interest in Kotlin)

package com.includehelpimport java.util.*//Main Function , Entry point of Program fun main(args: Array<String>) {//Input Streamval scanner = Scanner(System.`in`)//Input Amountprint("Enter Principal Amount : ")val principalAmount = scanner.nextDouble()//Input Interest Rateprint("Enter Rate of Interest : ")val rateOfInterest = scanner.nextDouble()//Input time in yearsprint("Enter Time : ")val time = scanner.nextDouble()//Calculate Compound Interestval compoundInterest = principalAmount.toDouble() * Math.pow((1 + rateOfInterest.toDouble()/100.00),time.toDouble())//Print Compound Interestprintln("Compound Interest is :$compoundInterest") }

Output

輸出量

Enter Principal Amount : 5000 Enter Rate of Interest : 12 Enter Time : 5 Compound Interest is :8811.708416000003

翻譯自: https://www.includehelp.com/kotlin/calculate-compound-interest.aspx

kotlin 計算平方

總結

以上是默认站点為你收集整理的kotlin 计算平方_Kotlin程序来计算复利的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得默认站点網站內容還不錯,歡迎將默认站点推薦給好友。