martes, 27 de octubre de 2009

Practica 8.2 c) Consola


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

namespace Practica_8._._2_C__Consola
{
class Program
{
static void Main(string[] args)
{
int[] emax = new int[10];
int i, menor, pos;
Console.WriteLine("Introdusca 10 numeros enteros");
emax[0] = int.Parse(Console.ReadLine());
menor = emax[0];
pos = 0;
for (i = 1; i <>
{
Console.WriteLine("Introduce dato {0}", i);
emax[i] = int.Parse(Console.ReadLine());
if (emax[i] <>
{
menor = emax[i];
pos = i;
}
}

Console.WriteLine("\nLista de 10 elementos");
for (i = 0; i <>
{
Console.WriteLine(emax[i]);
}
Console.WriteLine("\nEl valor minimo es={0}", menor);
Console.WriteLine("Este es el elemtento numero {0} en la lista de numeros", pos);
Console.ReadKey();
}
}
}

No hay comentarios:

Publicar un comentario