MIRA EL ALGORITMO QUE BUSCAS ES UN TANTO SENCILLO, SOLO DEBES BASARTE EN ESTE ALGORITMO PARA BUSCAR EL MAYOR DE TRES NUMEROS Y EL MENOR, PORQUE EL PROMEDIO YA ES COSA FACIL
AHI TE LO DEJO:
using System;
using System.Collections.Generic;
using System.Text;
namespace Ordena_tres_numeros
{
class Program
{
static void Main(string[] args)
{
String a, b, c;
Decimal Mayor;
Decimal Nro1, Nro2, Nro3;
Console.Title = "Detector_número_mayor";
Console.BackgroundColor = ConsoleColor.White;
Console.ForegroundColor = ConsoleColor.Green;
Console.Clear();
//Determina el mayor de tres números
Console.WriteLine("Este programa identifica el mayor de tres números");
Console.WriteLine("Ingrese el 1er número, presione enter e ingrese el 2do número, presione enter e ingrese el 3er número");
//Leer números
a = Console.ReadLine();
Nro1 = Convert.ToDecimal(a);
b = Console.ReadLine();
Nro2 = Convert.ToDecimal(b);
c = Console.ReadLine();
Nro3 = Convert.ToDecimal(c);
//Determinar el número mayor
if (Nro1 >= Nro2)
if (Nro1 >= Nro3)
Mayor = Nro1;
else
Mayor = Nro3;
else
if (Nro2 >= Nro3)
Mayor = Nro2;
else
Mayor = Nro3;
//Escribir número mayor
Console.WriteLine("El número mayor es: {0}", Mayor);
Console.Read();
}
}
}