标签:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data; using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
int i, x, y ;
x = int.Parse(textBox1.Text);
y = int.Parse(textBox2.Text);
i = x + y;
textBox4.Text = i.ToString();
}
private void button2_Click(object sender, EventArgs e)
{
int i, x, y;
x = int.Parse(textBox1.Text);
y = int.Parse(textBox2.Text);
i = x - y;
textBox4.Text = i.ToString();
}
private void button3_Click(object sender, EventArgs e)
{
int i, x, y;
x = int.Parse(textBox1.Text);
y = int.Parse(textBox2.Text);
i = x * y;
textBox4.Text = i.ToString();
}
private void button4_Click(object sender, EventArgs e)
{
int i, x, y;
x = int.Parse(textBox1.Text);
y = int.Parse(textBox2.Text);
i = x / y;
textBox4.Text = i.ToString();
}
}
}
标签:
原文地址:http://www.cnblogs.com/louwentao/p/4857860.html