using System;
using System.Linq;
class MainClass {
staticdouble Square(double n) {
return Math.Pow(n, 2);
}
publicstaticvoid Main() {
int[] numbers = { 1, 2, 3 };
var query = from n in numbers select Square(n);
foreach (var n in query)
Console.WriteLine(n);
}
}