Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace WindowsFormsApplication1
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- Random rand = new Random();
- textBox1.Text = rand.Next(2, 20).ToString();
- textBox2.Text = rand.Next(4, 40).ToString();
- }
- private void button1_Click(object sender, EventArgs e)
- {
- int a = Int32.Parse(textBox1.Text);
- int b = Int32.Parse(textBox2.Text);
- int c = a + b;
- label1.Text = c.ToString();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment