Académique Documents
Professionnel Documents
Culture Documents
if (num % 2 == 0)
{
txRes.Text = "S";
txRes.BackColor = Color.Green;
}
else
{
txRes.Text = "N";
txRes.BackColor = Color.Red;
}
}
if (num % 2 == 0)
{
inf = "S";
}
else
{
inf = "N";
}
return inf;
}
1
private void button1_Click(object sender, EventArgs e)
{
int num = Convert.ToInt16(txNum.Text);
if (num % 2 == 0)
{
txRes.Text = "S";
txRes.BackColor = Color.Green;
}
else
{
txRes.Text = "N";
txRes.BackColor = Color.Red;
}
}
if (num % 2 == 0)
{
txRes.Text = "S";
txRes.BackColor = Color.Green;
}
else
{
txRes.Text = "N";
txRes.BackColor = Color.Red;
}
}
if (num % 2 == 0)
{
inf = "S";
}
else
{
inf = "N";
}
return inf;
}
private void button3_Click(object sender, EventArgs e)
{
calcular1();
}
2
private void button6_Click(object sender, EventArgs e)
{