Driver Code
public static void main ( String [ ] args ) { int A [ ] = { 4 , 7 , 2 , 0 , 8 , 7 , 5 } ; int K = 2 ; int N = A . length ; double n = kPresentProbability ( A , N , K ) ; double p = ( double ) Math . round ( n * 100 ) / 100 ; System . out . println ( p ) ; } }