using System;
using System.Collections.Generic;
using System.Linq;
public class Program
{
public static void Main(string[] args)
Console.WriteLine("Please uncomment a question");
}
//*********************
//*** Question 1
//*** Describe the output of this program
/*
int[] arr = new int[] {1 ,2 ,3 ,4 ,5 };
fun1(arr);
Console.ReadLine();
static void fun1(int[] array)
for (int i = 0; i < array.Length; i=i+2)
array[i] = array[i] + 10;
Console.WriteLine(string.Join(",", array));
*/
//*** Question 2
int num = 5;
int square = 0, cube = 0;
Mul (num, out square, out cube);
Console.WriteLine(square + " & " +cube);
static void Mul (int num, out int square, out int cube)
square = num * num;
cube = num * num * num;
//*** Question 3
//*** Write a program to check two given integers, and return true if one of them is 30 or if their sum is 30.
Console.WriteLine(test(30, 0));
Console.WriteLine(test(25, 5));
Console.WriteLine(test(20, 30));
Console.WriteLine(test(20, 25));
public static bool test(int x, int y)
//code goes here
//*** Question 4
//*** Write a function to exchange the first and last characters in a given string and return the new string.
Console.WriteLine(test("abc"));
Console.WriteLine(test("abcdef"));
Console.WriteLine(test("xy"));
Console.WriteLine(test("x"));
public static string test(string str)
//*** Question 5 (LINQ)
//*** Write a function that finds and adds all the even numbers in the array
public static void Main(int[] intArray) {
long res = TotalAllEvenNumbers(arr);
Console.WriteLine(res);
static long TotalAllEvenNumbers(int[] intArray) {
//*** Question 6 (LINQ)
//*** Find which numbers in the array when squared are more than 20
var arr1 = new[] { 3, 9, 2, 8, 6, 5 };
var res = FindAllNumbers(arr1);
Console.WriteLine(String.Join(",", res));
static List<int> FindAllNumbers(int[] intArray) {