Docsity

Programming,, Assignments of Information and Communications Technology (ICT)

Toggle sidebar
bg1
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 WindowsFormsApplication2
{
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 WindowsFormsApplication2
{
public partial class Form8 : Form
{
public Form8()
pf2

Partial preview of the text

Download Programming, and more Assignments Information and Communications Technology (ICT) in PDF only on Docsity!

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(); } } }