You are on page 1of 1

using System;

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

namespace ConsoleApplication25
{
class Program
{
static void Main(string[] args)
{
int[] A;
Console.Write("Ingrese la longitud del vector A: ");
int n = int.Parse(Console.ReadLine());
A = new int[n];
Console.WriteLine("Ingresando valores al vector A");
for (int i = 0; i < A.Length; i++)
{
Console.Write("Ingrese componente [" + (i + 1) + "]:
");
A[i] = int.Parse(Console.ReadLine());
}
for (int i = 0; i < A.Length; i++)
{
Console.Write("[" +A[i] + "] ");
}

Console.ReadKey();
}
}
}

You might also like