Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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 T2IT1_Exercicio0702
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void button6_Click(object sender, EventArgs e)
- {
- Close();
- }
- private void button5_Click(object sender, EventArgs e)
- {
- textBox1.Clear();
- textBox2.Clear();
- textBox3.Clear();
- textBox1.Focus();
- }
- private void button1_Click(object sender, EventArgs e)
- {
- int vA, vB, res;
- vA = int.Parse(textBox1.Text);
- vB = int.Parse(textBox2.Text);
- res = vA + vB;
- textBox3.Text = res.ToString();
- }
- private void button2_Click(object sender, EventArgs e)
- {
- int vA, vB, res;
- vA = int.Parse(textBox1.Text);
- vB = int.Parse(textBox2.Text);
- res = vA - vB;
- textBox3.Text = res.ToString();
- }
- private void button3_Click(object sender, EventArgs e)
- {
- int vA, vB, res;
- vA = int.Parse(textBox1.Text);
- vB = int.Parse(textBox2.Text);
- res = vA * vB;
- textBox3.Text = res.ToString();
- }
- private void button4_Click(object sender, EventArgs e)
- {
- int vA, vB, res;
- vA = int.Parse(textBox1.Text);
- vB = int.Parse(textBox2.Text);
- res = vA / vB;
- textBox3.Text = res.ToString();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement