using System.Collections.Generic;
using System.Threading.Tasks;
static void Main(string[] args)
public static void ReverseArray()
Console.Write("No. elements in the array for the reverse array:");
n = Convert.ToInt32(Console.ReadLine());
Console.Write("Input {0} elements:\n", n);
Console.Write("Element {0} : ", i);
a[i] = Convert.ToInt32(Console.ReadLine());
Console.Write("\nThe Array is : \n");
Console.Write("{0} ", a[i]);
Console.Write("\n\nThe reverse array is :\n");
for (i = n - 1; i >= 0; i--)
Console.Write("{0} ", a[i]);
public static void CountDuplicate()
Console.WriteLine("No. of elements fpr the count duplicate");
int n = Convert.ToInt32(Console.ReadLine());
for (int i = 0; i < n; i++)
Console.Write("Element {0} : ", i);
arr[i] = int.Parse(Console.ReadLine());
Console.Write("No. of duplicated elements is : ");
for (int i = 0; i < n; i++)
for (int c = i + 1; c < n; c++)
public static void UniqueNumbers()
Console.Write("No. of elements in the array for the unique numbers:");
a = Convert.ToInt32(Console.ReadLine());
Console.Write("Input {0} elements:\n", a);
Console.Write("element - {0} : ", i);
c[i] = Convert.ToInt32(Console.ReadLine());
Console.Write("\nThe unique elements are : \n");
for (j = 0; j < i - 1; j++)
for (k = i + 1; k < a; k++)
Console.Write("{0} ", c[i]);
public static void Bubble()
int[] a = { 7, 5, 4, 10 };
Console.WriteLine("Array:");
for (int c = 0; c <= a.Length - 2; c++)
for (int i = 0; i <= a.Length - 2; i++)
Console.WriteLine("\n" + "Sorted array :");
public static void SumArrays()
Console.Write("No. elements for the sum?");
int n = Int32.Parse(Console.ReadLine());
double[] numbers = new double[n];
for (int i = 0; i < numbers.Length; i++)
Console.Write("Element {0}: ", i + 1);
numbers[i] = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("The Sum is : " + sum);
public static void OddEven()
Console.Write("No. of elements for the odd and even:");
d = Convert.ToInt32(Console.ReadLine());
Console.Write("Input {0}:\n", d);
Console.Write("element - {0} : ", i);
a[i] = Convert.ToInt32(Console.ReadLine());
Console.Write("\nThe Even are : \n");
Console.Write("{0} ", b[i]);
Console.Write("\nThe Odd are :\n");
Console.Write("{0} ", c[i]);
public static void RemoveItem()
Console.Write("No. of elements for the DeleteItem: ");
n = Convert.ToInt32(Console.ReadLine());
Console.Write("Input {0} elements in ascending order:\n", n);
Console.Write("element - {0} : ", i);
a[i] = Convert.ToInt32(Console.ReadLine());
Console.Write("\nIndex of element you want to delete:");
position = Convert.ToInt32(Console.ReadLine());
while (i != position - 1)
Console.Write("\nThe new array is: ");
Console.Write(" {0}", a[i]);
public static void JoinArrays()
Console.Write("No. of elements for the first array for JoinArrays:");
x = Convert.ToInt32(Console.ReadLine());
Console.Write("Input {0} elements:\n", x);
Console.Write("element - {0} : ", i);
a[i] = Convert.ToInt32(Console.ReadLine());
Console.Write("No. of elements for the second array for JoinArrays:");
y = Convert.ToInt32(Console.ReadLine());
Console.Write("Input {0} elements:\n", y);
Console.Write("element - {0} : ", i);
b[i] = Convert.ToInt32(Console.ReadLine());
for (k = 0; k < z - 1; k++)
Console.Write("\nThe joinned array in ascending order is :\n");
Console.Write("{0} ", c[i]);
public static void JoinAndRemove()
Console.Write("No. of elements for the first array for JoinArrays:");
x = Convert.ToInt32(Console.ReadLine());
Console.Write("Input {0} elements:\n", x);
Console.Write("element - {0} : ", i);
a[i] = Convert.ToInt32(Console.ReadLine());
Console.Write("No. of elements for the second array for JoinArrays:");
y = Convert.ToInt32(Console.ReadLine());
Console.Write("Input {0} elements:\n", y);
Console.Write("element - {0} : ", i);
b[i] = Convert.ToInt32(Console.ReadLine());
for (k = 0; k < z - 1; k++)
Console.Write("\nThe joinned array in ascending order is :\n");
Console.Write("{0} ", c[i]);
Console.Write("\nIndex of element you want to delete:");
position = Convert.ToInt32(Console.ReadLine());
while (l != position - 1)
Console.Write("\nThe new array is: ");
for (l = 0; l < c[]; l++)
Console.Write(" {0}", c[l]);