using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Class1
{
internal class Program
{
//This is the main static function... this is important,
///because it is the core of our program, without it, the program will not work.
static void Main(string[] args)
{
//ARRAYS
//Arrays are used to store data...
//such as numbers, strings, other data types, and objects...
int[] vector = new int[5]; //We create an integer array... which can hold 5 values... this is its length...
//Enter data into our Array
for (int i = 0; i < vector.Length; i++) //We iterate from 0 to the length of the array, which is 5
{
Console.WriteLine("Enter number " + i + " : ");
vector[i] = int.Parse(Console.ReadLine()); //We input data into the first position... and so on until the maximum of the array, which is 5
}
//We print the stored data:
Console.WriteLine();
Console.WriteLine("Entered data:");
Console.WriteLine("------------------");
for (int i = 0; i < vector.Length; i++)
{
Console.WriteLine(vector[i]); ////Each value in the array is printed
}
Console.WriteLine("------------------");
Console.ReadKey();
}
}
}