So if I look at this correctly, my issue is in the decrypt function with: flag= flag%26;
Do you agree?
So if I look at this correctly, my issue is in the decrypt function with: flag= flag%26;
Do you agree?
No problem, dodgetech - and yes, if you are assigning a letter or a number, based on a negative index of the character set (aka ascii values) - that would be a big red flag, since there are none.
However, I'd still like to know that the encrypt function was working OK, at least in a simple preliminary test, with vowels and consonants.
When you're working with arrays, you always need to test or watch carefully, the ENDS of them (high and low), to see that they don't run over or under, their legit range. Vowels to test would be a and e, and u and y (if you have y as a vowel - some do, some don't). Consonants to test would be b and c and x and z.
We know you're a beginner - but we're not going to let you get away with anything anyway! <smile>