

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


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 WindowsFormsApplication { public partial class Form7 : Form { public Form7() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { int t1 = Convert.ToInt32(textBox1.Text); int t2 = Convert.ToInt32(textBox2.Text); textBox3.Text = (t1 + t2).ToString(); textBox4.Text = (((t1 + t2) * 10) / 100).ToString(); int tot = Convert.ToInt32(textBox3.Text); int dic = Convert.ToInt32(textBox4.Text); textBox5.Text = (tot - dic).ToString(); } private void button2_Click(object sender, EventArgs e) { textBox1.Text = ""; textBox2.Text = ""; textBox3.Text = ""; textBox4.Text = ""; textBox5.Text = ""; } } } 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 WindowsFormsApplication { public partial class Form8 : Form { public Form8()
InitializeComponent(); } private void button3_Click(object sender, EventArgs e) { int a = Convert.ToInt32(textBox1.Text); int b = Convert.ToInt32(textBox2.Text); MessageBox.Show((a + b).ToString()); } private void button2_Click(object sender, EventArgs e) { textBox1.Text = ""; textBox2.Text = ""; } private void button1_Click(object sender, EventArgs e) { Close(); } } }