Skip to content

Commit

Permalink
Divisibility ShivangiSingh17#131
Browse files Browse the repository at this point in the history
  • Loading branch information
afflato committed Oct 15, 2019
1 parent 7da8cd2 commit d930d5d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Divisibility.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import java.util.Comparator;
import java.util.stream.Collectors;
import java.util.stream.IntStream;

public class Divisibility {

public static void main(String[] args) {
IntStream.range(1, 100)
.boxed()
.filter(num -> num%7 == 0)
.sorted(Comparator.reverseOrder())
.collect(Collectors.toList())
.forEach(System.out::println);
}

}

0 comments on commit d930d5d

Please sign in to comment.