Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- namespace SqurtNums
- {
- class Program
- {
- static void Main(string[] args)
- {
- int[] arr = Console.ReadLine()
- .Split(" ", StringSplitOptions.RemoveEmptyEntries)
- .Select(int.Parse)
- .Where(x => Math.Sqrt(x) % 1 == 0)
- .ToArray();
- Console.WriteLine(string.Join(" ", arr));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement