For starters, what do you think "(input[n] == 'D' || 'd')" does?