Write a program to filter given numbers array by removing negative numbers.
arr = [12, -5, 8, -2, 17, -9]
[12, 8, 17]
Input:
arr = [-12, 5, -8, 2, -17, 9]
Output:
[5, 2, 9]
Last updated 2 years ago