On my computer, it displays all the results... :-?
If you want it to display it one line after the other, then change it be so! Copying others' programs will not help you learn
The total number of possible combinations is the number of possible selections for each charector. So 36 * 36 * 36 = 46656. Your formula just isn't right for this particular scenorio. If you want to know why, ask a statistition