Automobile Loan Calculator
来源:互联网 发布:grpc java实现 编辑:程序博客网 时间:2024/05/13 21:27
'学习心得'运算符的优先级'变量名的制定:g(是否是全局)+数据类型+变量=变量名;gdblName' AcceptButton Property of the Form specifies this button.When the user press the Enter key or clicks the default button on a form that has the AcceptButton property set.''MonthlyPayment = (InterestRate*(1+InterestRate)^NumberOfPayments)/((1+InterestRate)^NumberOfPayments-1)*LoanAmount 这个在 “Pmt Founction ” 里面有'Format Function 将日期,时间等转换成专用的格式Option Strict OnPublic Class Form1 'Purpose: This project calculates the monthly payment: ' a loan based on loan amount, interest rate(利率), ' Dim gdblMonths As Double = 60.0 Const MaximumLoanAllowed As Integer = 25000 Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load nudLoanAmount.Maximum = MaximumLoanAllowed End Sub Private Sub btnReset_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnReset.Click nudLoanAmount.Value = 0 nudRate.Value = 5 radFiveYears.Checked = True txtMonthlyPayment.Text = "$0.00" End Sub Private Sub radTwoYears_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles radTwoYears.CheckedChanged gdblMonths = 24.0 End Sub Private Sub radFiveYears_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles radFiveYears.CheckedChanged gdblMonths = 12.0 * 5 End Sub Private Sub radSixYears_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles radSixYears.CheckedChanged gdblMonths = 12.0 * 6 End Sub Private Sub btnComputePayment_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnComputePayment.Click Dim dblRate, dblMonths, dblPayment As Double Dim dblLoanAmount As Double, strPayment As String dblRate = (Convert.ToDouble(nudRate.Value) / 100.0) / 12.0 dblLoanAmount = Convert.ToDouble(nudLoanAmount.Value) dblPayment = Pmt(dblRate, gdblMonths, -dblLoanAmount) strPayment = Format(dblPayment, "c") 'strPayment = dblPayment.ToString ' Or use " convert.tostring(dblPayment) " txtMonthlyPayment.Text = strPayment '显示的是本机的现金符号, 如需更改请用 globlization.currentinfo End SubEnd Class
0 0
- Automobile Loan Calculator
- JavaScript权威指南 Loan Calculator示例说明
- [Code] 《JS权威指南》示例程序 -- Loan Calculator
- Automobile history
- loan deal/loan facility
- Secured loan
- Loan Commitment
- Syndicated Loan
- Term Loan
- Swingline Loan
- loan category
- Loan Pattern
- Calculator
- Calculator
- Calculator
- Calculator
- Calculator
- Calculator
- Android 文件读写
- Apache Mina(二)
- combobox年份选择
- CSS 中 display:inline-block 属性使用详解
- centos/redhat安装node-echarts(后台生成echarts图片,中文不乱码)
- Automobile Loan Calculator
- C++类和接口的设计原则探讨
- 利用php数组函数进行函数式编程
- [leetcode:python]88.Merge Sorted Array
- 新路程------imx6 uart和串口(1)
- 二叉排序树实现简单的通讯录
- 优化数据库
- myeclipse进行tomcat7热部署
- ModelMap和ModelAndView的作用