Documentos de Académico
Documentos de Profesional
Documentos de Cultura
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace DEBERES
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
}
else
{
MessageBox.Show("EL NUMERO INGRESADO NO ES PRIMO");
}
}
private bool verificarPrimo(int numero)
{
int cont = 0;
for (int i = 1; i <= numero; i++)
{
if (numero % i == 0)
{
cont++;
}
}
if (cont == 2)
{
return true;
}
else
{
return false;
}
}
#endregion
}
else
{
MessageBox.Show("EL NUMERO " + num + " ES PAR");
}
}
{
return false;
}
}
#endregion