Generation

generate functionThu, 25 May 2023

Generar un condicionamiento IF-Else para realizar suma, resta, multiplicacion y division en un formulario con clicks

private void button1_Click(object sender, EventArgs e) { if (radioButton1.Checked) { int a, b, c; a = Convert.ToInt32(textBox1.Text); b = Convert.ToInt32(textBox2.Text); c = a + b; textBox3.Text = Convert.ToString(c); } else if (radioButton2.Checked) { int a, b, c; a = Convert.ToInt32(textBox1.Text); b = Convert.ToInt32(textBox2.Text); c = a - b; textBox3.Text = Convert.ToString(c); } else if (radioButton3.Checked) { int a, b, c; a = Convert.ToInt32(textBox1.Text); b = Convert.ToInt32(textBox2.Text); c = a * b; textBox

Want to kickstart your project?Use the new AI Studio to create your code