Programas en C#

Monday, November 20, 2006

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


namespace ej5
{
class Program
{
static void Main(string[] args)
{
double a, b, c;

Console.WriteLine("Escriba el primer valor");
a = Double.Parse(Console.ReadLine());
Console.WriteLine("Escriba el segundo valor");
b = Double.Parse(Console.ReadLine());
Console.WriteLine("Escriba el tercer valor");
c = Double.Parse(Console.ReadLine());

if ((a > b)&&(a>c))
Console.WriteLine("{0} es el mayor",a);
else
Console.WriteLine("{0} es el menor", a);
if (( b>a )&&(b>c))
Console.WriteLine("{0} es el mayor",b);
else
Console.WriteLine("{0} es el menor", b);
if ((c > a) && (c > b))
Console.WriteLine("{0} es el mayor", c);
else
Console.WriteLine("{0} es el menor", c);





}
}
}

0 Comments:

Post a Comment

<< Home