IanosStefanCristian

Multiply by Length

Mar 9th, 2021
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. using System.Linq;
  2. public class Program
  3. {
  4. public static int[] MultiplyByLength(int[] arr)
  5. {
  6. var multiplier = arr.Length;
  7. return arr.Select(x => x * multiplier).ToArray();
  8. }
  9. }
Advertisement
Add Comment
Please, Sign In to add comment