using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Practica_8._2_B__Consola
{
class Program
{
static void Main(string[] args)
{
int[] emax = new int[10];
int i, mayor,pos;
Console.WriteLine("Introdusca 10 numeros enteros");
emax[0] = int.Parse(Console.ReadLine());
mayor = emax[0];
pos = 0;
for (i = 1; i <>
{
Console.WriteLine("Introduce dato {0}", i);
emax[i] = int.Parse(Console.ReadLine());
if (emax[i] > mayor)
{
mayor = emax[i];
pos=i;
}
}
Console.WriteLine("\nLista de 10 elementos");
for (i = 0; i <>
{
Console.WriteLine(emax[i]);
}
Console.WriteLine("El valor maximo es={0}", mayor);
Console.WriteLine("Este es el elemtento numero {0} en la lista de numeros",pos);
Console.ReadKey();
}
}
}

No hay comentarios:
Publicar un comentario