using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Ejemplo
{
public partial class Form1 : Form
{
int contador;
public Form1()
{
contador = 0;
InitializeComponent();
}
private void displayBtn_Click(object sender, EventArgs e)
{
contador++; ;
Display.AppendText(contador + "n");
//Este if dice si es par o no.
if (contador% 2 == 0)
{
EtiqPar.Text="Si";
}else
{
EtiqPar.Text="No";
}
//Este dice si es divisible entre 3.
if (contador % 3 == 0)
{
EtiqDiv.Text = "Si";
}
else
{
EtiqDiv.Text = "No";
}
}
}
}