Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static double[] greaterthan(double[] array, double x) {
- double [] numbers = new double[array.length];
- int ip = 0;
- for (double a : array) {
- if (a >= x) {
- numbers[ip++] = a;
- }
- }
- return Arrays.copyOf(numbers, ip);
- }
- double[] a = {1, 2, 3, 4, 5, 2.2, 50};
- [D@15db9742
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement