internal class Program { private static void Main(string[] args) { // Prompt the user to enter the size of the array Console.WriteLine("Enter the amount of messurements you want for the array:"); int size; while (!int.TryParse(Console.ReadLine(), out size) || size <= 0) { Console.WriteLine("Invalid input. Please enter a positive integer for the size of the array:"); } // Create an array of the specified size int[] array = new int[size]; // Prompt the user to enter elements for the array Console.WriteLine($"Enter {size} messurements for the array:"); // Read user input for each element and store it in the array for (int i = 0; i < size; i++) { int element; while (!int.TryParse(Console.ReadLine(), out element)) { Console.WriteLine("Invalid input. Please enter an integer for the element:"); } array[i] = element; } // Print the elements of the array Console.WriteLine("The messurements of the array are:"); foreach (int element in array) { Console.WriteLine(element); } } }