Find Prime numbers in a given range using arrays
Santhosh Ssquare
public void BasicsOfArray(){Console.WriteLine("Enter Min range");int MinRange = Convert.ToInt32(Console.ReadLine());Console.WriteLine();Console.WriteLine("Enter Max range");int MaxRange = Convert.ToInt32(Console.ReadLine());int[] arr6 = new int[MaxRange];int Count = 0;Console.WriteLine("Prime number.");for (int i = MinRange; i < MaxRange; i++){for (int j = 1; j < MaxRange; j++){if (i % j == 0){Count++;}}if (Count == 2){arr6[Index] = i;Console.Write(arr6[Index] + " ");}Count = 0;}Console.ReadLine();}