12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- 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 Calc2
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- float a, b;
- int oper;
- bool znak = true;
- private void button15_Click(object sender, EventArgs e)
- {
- if (znak == true)
- {
- textBox1.Text = "-" + textBox1.Text;
- znak = false;
- }
- else if (znak == false)
- {
- textBox1.Text = textBox1.Text.Replace("-", "");
- znak = true;
- }
- }
- private void button11_Click(object sender, EventArgs e)
- {
- textBox1.Text = textBox1.Text + 0;
- }
- private void button12_Click(object sender, EventArgs e)
- {
- textBox1.Text = textBox1.Text + ",";
- }
- private void button16_Click(object sender, EventArgs e)
- {
- a = float.Parse(textBox1.Text);
- textBox1.Clear();
- oper = 1;
- label1.Text = a.ToString() + "+";
- znak = true;
- }
-
- }
- }
|