Welcome to DaniWeb. Please learn to use code tags when posting code to this site. See the watermark in the posting window or the announcement section at the top of the board to learn how.
First I think you need to determine whether the char need be case sensitive or not. If not, then it's probably easiest to convert the input into either all caps or all lower case. Then you could use a switch statement with the char as the parameter sent to the switch or, frequently used to do this, an array of ints with the index to represent the distance from 'A' or 'a'.
Reputation Points: 718
Solved Threads: 373
Nearly a Posting Maven
Offline 2,253 posts
since Jul 2005