發表文章

孫國益

圖片
2021年1月7日期末考 現值 利率 期數 金流 終值 對照EXCEL先打開從範圍定義名稱 對照EXCEL金融計算 CSS網頁顏色表參考自 維基百科 中文 英文 代碼&顏色 中文 英文 代碼&顏色 中文 英文 代碼&顏色 中文 英文 代碼&顏色 黑色 black #000000 銀色 silver #c0c0c0 栗色 maroon #800000 紅色 red #ff0000 深藍色 navy #000080 藍色 blue #0000ff 紫色 purple #800080 品紅色 fuchsia #ff00ff 綠色 green #008000 萊姆色 lime #00ff00 橄欖色 olive #808000 黃色 yellow #ffff00 墨綠色 teal #008080 青色 cyan #00ffff 灰色 gray #808080 白色 white #ffffff 程式碼 <style> h1{border: 30px outset pink;     background-color: green;     color: white;   text-align: center;} </style> <h1>2021年1月7日期末考</h1> <!--輸出現值計算結果到 td--><table border="1"> <tbody> <tr><td>現值</td><td><input id="p" type="number" /></td><td><input onclick="CompP()" type="button" value="計算現值" /></td><td id="p_" width="160"></td></tr> <tr><td>利率</td...

孫國益期末考

圖片
孫國益2021年1月期末考 現值 利率 期數 金流 終值 對應的EXCEL 開啟從選取範圍建立名稱 程式碼

孫國益 HTML JavaScript期末考

孫國益2021年1月期末考 現值 利率 期數 金流 終值

第十六周 嵌入

嵌入臉書影片 嵌入ifream   嵌入javascript skd 投入、陶醉與個性,她壓倒其他所有的舞者。 由 Robert Liu 發佈於  2020年12月18日 星期五 嵌入由任昌臉書舌板 嵌入ifream 嵌入javascript skd 溜蛇板的季節,來了。 由 Robert Liu 發佈於  2020年12月17日 星期四 嵌入同學影片

第十五周孫國益

圖片
利率y(rate) 期數n(nper) 金流m(pmt) 終值f(fv) 參考劉任昌 金融市場講義 孫國益學習HTML+CSS+JavaScript程式碼 <style> h1{border: 30px outset red;     background-color: green;     color: white;   text-align: center;} </style> <script> function computePV(){   var r = document.getElementById("rate").value;   var n = document.getElementById("nper").value;   var m = document.getElementById("pmt").value;   var f = document.getElementById("fv").value;   pvif =r;   pvif++;   pvif =1/pvif**n;   var pv = (1-pvif)*m/r + f * pvif;   document.getElementById("pv").innerHTML = pv; } </script> <body> <table border="1"> <tr><td>利率y(rate)</td><td>期數n(nper)</td><td>金流m(pmt)</td><td>終值f(fv)</td></tr>    <td><input id="rate" type="number"/></td>    <td><input id="nper" type="number" /></t...

第十四周

圖片
孫國益學劉任昌程式碼

第十三周

圖片
在word打開開發人員功能  Dim n As Integer Dim spec As String Const period As Integer = 4 Const maxerror As Double = 0.0000001 Dim payment(period) As Double '廣域變數 4 維度的陣列 Private Sub CommandButton1_Click()   Dim a, b, c, f, gap As Double   Dim loopNumber As Integer   n = n + 1   a = 0   b = 1   gap = 10   loopNumber = 10   payment(0) = TextBox1.Value   payment(1) = TextBox2.Value   payment(2) = TextBox3.Value   payment(3) = TextBox4.Value   f = npv(a)   If f = 0 Then      Label9.Caption = 0   ElseIf f < 0 Then      Label9.Caption = "內部報酬率小於 0."   Else      Do While gap > mexerror And Abs(f) > maxerror And loopNumber < 100        loopNumber = loopNumber + 1        c = (a + b) / 2        f = npv(c)        If Abs(f) > maxerror And gap > maxerror Then         ...