Programas en C#

Monday, November 20, 2006

using System;
using System.Collections.Generic;
using System.Text;

namespace ej2
{
class Program
{
static void Main(string[] args)
{
int n;

Console.WriteLine("Escriba un numero");
n = Int32.Parse(Console.ReadLine());
if (n % 2==0)
Console.WriteLine("El numero es par");
else
Console.WriteLine("El numero es impar");


}
}
}

0 Comments:

Post a Comment

<< Home