12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- 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 Zubova_Калькулятор
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- public static double sum(double a, double b)
- {
- return a + b;
- }
- public static double razn(double a, double b)
- {
- return a - b;
- }
- public static double umnog(double a, double b)
- {
- return a * b;
- }
- public static double del(double a, double b)
- {
- return a / b;
- }
- public static double step(double a, double b)
- {
- return Math.Pow(a, b);
- }
- public static double koren(double a, double b)
- {
- return Math.Pow(a, 1 / b);
- }
- private void button1_Click(object sender, EventArgs e)
- {
- textBox3.Text = Convert.ToString(sum(Convert.ToDouble(textBox1.Text), Convert.ToDouble(textBox2.Text)));
- }
- private void button2_Click(object sender, EventArgs e)
- {
- textBox3.Text = Convert.ToString(razn(Convert.ToDouble(textBox1.Text), Convert.ToDouble(textBox2.Text)));
- }
- }
- }
|