c# |
public Form1()
{
InitializeComponent();
}
Random r;
r = new Random();
int a, b,c;
private void button1_Click(object sender, EventArgs e)
{
a = r.Next(10, 100);
b = r.Next(10, 100);
textBox1.Text = a + " ";
textBox2.Text = b + " ";
}
private void button2_Click(object sender, EventArgs e)
{
if (comboBox1.SelectedItem == "toplama" )
{
c = a + b;
}
else if (comboBox1.SelectedItem == "çıkarma")
{
c = a - b;
}
label4.Text = c.ToString();
}
0 yorum :
Yorum Gönder