程序编写:
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 jisuan
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
double InitValue = double.Parse(textBox1.Text.Trim());
double value1, value2, value3;
value1 = InitValue * 3.14;
value2 = InitValue+1;
value3 = InitValue*InitValue;
textBox2.Text = value1.ToString() ;
textBox3.Text = value2.ToString();
textBox4.Text = value3.ToString();
}
}
}
效果: