With the mod math, (Plainletter+key)%26 could give a remainder, an int. This remainder may not be the int number for the corresponding cipher letter. how to wrap around this remainder if it falls out side of the alaphabet int values?
You need to review the class material on this technique. The modulo operation only works when letters are represented by numbers from 0 to 25 inclusive. It won't work on ASCII values of letters. You need to convert ASCII values down to numbers from 0 to 25, do the shift, apply the modulo and then convert back to ASCII.
If this answers your question, please click on the check mark to accept. Let's keep up on forum maintenance. ;-)