private void BTequal_Click(object sender, EventArgs e) { TBscreen.AppendText("\r\n"); add_array(); get_actions(); double a = arr[0]; double b; for (int i = 0; i < actions.Length; i++) { b = arr[i + 1]; switch (actions[i]) { case '+': a = a + b; break; case '-': a = a - b; break; case '*': a = a * b; break; case '/': a = a / b; break; } } TBscreen.AppendText(a + "\r\n\r\n"); }
private void BTminus_Click(object sender, EventArgs e) { TBscreen.Text = ""; num += '-'; TBscreen.AppendText(num); }
private void BT1_Click(object sender, EventArgs e) { num += '1'; TBscreen.Text = ""; TBscreen.AppendText(num); }
private void BTdivide_Click(object sender, EventArgs e) { TBscreen.Text = ""; num += '/'; TBscreen.AppendText(num); }