9. single_dimentional_array in c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace single_dimentional_array.cs
{
class Program
{
static void Main(string[] args)
{
int[] a = new int[6] { 11, 12, 13, 14, 15, 16 };
int[] b;
b = new int[3] { 11, 12, 13 };
int[] c = { 11, 12 };
int[] d = new int[] { 11, 12, 13, 14, 15, 16 };
for (int i = 0; i < a.Length; i++)
{
Console.WriteLine("a [{0}] = {1}", i, a[i]);
}
foreach (int ans in d)
{
Console.WriteLine(ans);
}
Console.ReadLine();
}
}
}
Comments
Post a Comment