sábado, 1 de noviembre de 2008

Practica 5 Problema 3

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
int Numero = int.Parse(textBox1.Text);
if (Numero % 2 == 0)
MessageBox.Show(" El Numero es Par ");
else
MessageBox.Show(" El Numero es Impar ");
}
private void button2_Click(object sender, EventArgs e)
{
textBox1.Clear();
textBox1.Focus();
}
}
}

No hay comentarios: