Implement a method called pow2 that takes a collection of numbers and returns a collection of squares of these numbers.
Do not modify elements of the given collection, create a new one and return it as the result instead.
Implement a method called pow2 that takes a collection of numbers and returns a collection of squares of these numbers.
Do not modify elements of the given collection, create a new one and return it as the result instead.
Sample Input 1:
10 20 -5Sample Output 1:
100 400 25Create a free account to access the full topic