Ad
Code
Diff
  • using System.Linq;
    
    public class Program
    {
      public static int FindSquaresInArray(int[] arr){
        return arr.Sum(x => x * x);
      } 
    }
    • using System.Linq;
    • public class Program
    • {
    • public static int FindSquaresInArray(int[] arr) => arr.Sum(x => x * x);
    • public static int FindSquaresInArray(int[] arr){
    • return arr.Sum(x => x * x);
    • }
    • }