## Combinations

**Executable:**

Combinazioni_n_k

**Purpose:**

Extracts all K by K combinations of a string of length N past as input.

**Input:**

1) –s: {STRINGA} Input string of with all distinct characters

2) –k: {k}: Value of the length of the chunk of string (K by K combinations)

**Output:**

1) All combinations of the string K by K. The output is printed on the screen and can be redirected to a file with the usual operations "pipe" DOS (> or >>)

**Example:**

Combinazioni_n_k –s: ABCDE –k: 2

Returns:

A B

A C

A D

B C

B D

C D

These are the combinations of the string ABCDE taken 2 by 2. Note that if the string contains duplicate characters (eg ABCBCD, which contains the character "B" two times), the program returns an error.