Question: how to calculate this combination

if input n = 3 which means total 3 alphabet

if value = 2, expect output

a*b, a*c, b*c

 

if value = 1 expect output

a, b, c

 

if total n = 4, four alphabets

value = 3, expect output

a*b*c, a*b*d, a*c*d, b*c*d

 

value = 2 expect output

a*b, *a*c, a*d, b*c, b*d, c*d

Please Wait...