Arreglos

Páginas: 2 (308 palabras) Publicado: 23 de febrero de 2013
MAIN
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args){
Class1 a = new Class1();

Console.WriteLine("Arreglos unidimensionales");
a.agregar();
string desea;
do{Console.WriteLine("introduce la opcion a eligir 1. Impresion del arreglo, 2.Modificar 3. Eliminar ");
int opcion = Convert.ToInt32(Console.ReadLine());

switch (opcion){
case 1: a.imprimir();
a.imprimir2();
break;
case 2: a.modificar();break;
case 3: a.eliminar();
break;
default: { Console.WriteLine("opcion no valida");
break; }}




Console.ReadLine();


Console.WriteLine("Desea entrar s/n ");
desea = Console.ReadLine();}while(desea=="s" || desea=="S");
}
}
}

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

namespace ConsoleApplication1{
class Class1
{
public int[] nombre = new int[5];
public int[] ses = {1, 2, 3};

public void agregar()
{
Console.WriteLine("Llenararreglos ");
for (int a = 0; a < 5; a++)
{
Console.WriteLine("introduce elementos");
nombre[a] = Convert.ToInt32(Console.ReadLine());}

}
public void imprimir2()
{
Console.WriteLine(" otro arreglo ");
for (int a = 0; a <...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Arreglos
  • Arreglos
  • Arreglos
  • Arreglos
  • Arreglos
  • Arreglos
  • Arreglos
  • ARREGLOS

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS