1D Array program in C#.Net
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace _1D_Array
{
class Program
{
static void Main(string[] args)
{
int[] a = new int[5];
int i;
for (i = 0; i <= 4; i++)
{
Console.WriteLine("enter the value");
a[i] = Convert.ToInt32(Console.ReadLine());
}
for (i = 0; i <= 4; i++)
{
Console.WriteLine(a[i]);
}
}
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace _1D_Array
{
class Program
{
static void Main(string[] args)
{
int[] a = new int[5];
int i;
for (i = 0; i <= 4; i++)
{
Console.WriteLine("enter the value");
a[i] = Convert.ToInt32(Console.ReadLine());
}
for (i = 0; i <= 4; i++)
{
Console.WriteLine(a[i]);
}
}
}
}
OUTPUT : TO See output to run the Consol Application
Sign up here with your email
ConversionConversion EmoticonEmoticon