selection of r objects from n objects

+1
JAVA
java
OUTPUT