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 WindowsFormsApplication2
{
public partial class Form1 : Form
{
public String expression;
public Form1()
{
InitializeComponent();
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
expression = textBox1.Text;
}
private void button1_Click(object sender, EventArgs e)
{
textBox1.Text = expression + "=" + Result(expression);
}
private double Result(String expression)
{
int length = expression.Length;
char[] a = expression.ToCharArray(0, length);
double[] data = new double[10];
char[] oper = new char[10];
int datacount = 0, opercount = 0;
do
C#作业——表达式计算器+小数点
最新推荐文章于 2021-05-18 12:16:38 发布