sábado, 1 de noviembre de 2008

Practica 2 Problema 4

using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
int x1, y1, x2, y2, Mx, My;
Console.WriteLine("Introduzca las coordenadas");
x1 = int.Parse(Console.ReadLine());
y1 = int.Parse(Console.ReadLine());
x2 = int.Parse(Console.ReadLine());
y2 = int.Parse(Console.ReadLine());
Mx = (x1 + x2) / 2;
My = (y1 + y2) / 2;
Console.WriteLine("La coordenada x del punto medio es=" + Mx);
Console.WriteLine("La coordenada ydel punto medio es =" + My);
Console.ReadLine();
}
}
}

No hay comentarios: