using System; using System.Threading; class Program { static void Main() { // Array to be used by the first thread int[] arr = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; // Default string to be reversed string input = "DefaultString"; // You can change this value // Create and start threads Thread t1 = new Thread(() => CalculateSquares(arr)); Thread t2 = new Thread(() => ReverseString(input)); t1.Start(); t2.Start(); // Wait for both threads to finish t1.Join(); t2.Join(); } // Method to calculate and print squares of array elements static void CalculateSquares(int[] arr) { Console.WriteLine("Original Array: " + string.Join(", ", arr)); Console.Write("Squares of Array Elements: "); foreach (int number in arr) { Console.Write(number * number + " "); } Console.WriteLine(); } // Method to reverse a string static void ReverseString(string str) { char[] charArray = str.ToCharArray(); Array.Reverse(charArray); string reversed = new string(charArray); Console.WriteLine($"Original String: {str}"); Console.WriteLine($"Reversed String: {reversed}"); } }