in the program its a random number between 6 and 18
You do realize that's not at all the same, do you?
Put your results in an array, display it in order, present the current stat and let the user type the index of the number to assign to it. Then strike that number and start again. The interface would look something like this:
Code:
Choose your strength
1) 11
2) 12
3) 18
4) 15
5) 13
6) 12
Your choice: -> user types 3
Strength: 18
Choose your dexterity
1) 11
2) 12
3) 15
4) 13
5) 12
Your choice:
And so on.