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 add
{
public partial class Form1 : Form
{
public int a, b;
int result;
public Form1()
{
InitializeComponent();
this.MaximizeBox = false;
this.MinimizeBox = false;
}
private void textBox3_TextChanged(object sender, EventArgs e)
{
}
private void label3_Click(object sender, EventArgs e)
{
}
public void str()
{
a = Convert.ToInt16(textBox1.Text);
b = Convert.ToInt16(textBox2.Text);
}
private void button1_Click(object sender, EventArgs e)
{
str();
result=a+b;
MessageBox.Show(Convert.ToString(result));
}
private void button2_Click(object sender, EventArgs e)
{
str();
result = a - b;
MessageBox.Show(Convert.ToString(result));
}
private void button3_Click(object sender, EventArgs e)
{
str();
result = a * b;
MessageBox.Show(Convert.ToString(result));
}
private void button4_Click(object sender, EventArgs e)
{
str();
result = a / b;
MessageBox.Show(Convert.ToString(result));
}
}
}
//output
No comments:
Post a Comment