using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApplication2_Csharp
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
}
private void textBox2_TextChanged(object sender, EventArgs e)
{
}
private void textBox3_TextChanged(object sender, EventArgs e)
{
}
private void textBox4_TextChanged(object sender, EventArgs e)
{
}
private void label1_Click(object sender, EventArgs e)
{
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void buttonGo_Click(object sender, EventArgs e)
{
double baseMoney =Convert.ToDouble( textBoxBase.Text);
var year = Convert.ToInt32(textBoxYear.Text);
var interest = Convert.ToDecimal(textBoxInterest.Text) ;
textBoxSum.Text=(baseMoney*Math.Pow(Convert.ToDouble(1+interest),year)).ToString();
}
}
}
C# Windows Form编程---计算利率
最新推荐文章于 2022-02-28 16:29:01 发布