I'm trying to take an input
string of the alphabet and create an offset on it so that it starts with say 'D' and ends with XYZABC. Simply starting from an offset from A and finishing with whatever the offset skipped. I have no problem skipping the first few letters but it is tagging on what was skipped that I can't seem to get.
Here's my code:
I ask for the offset and the string (The user can input the alphabet already offset). I put the string into an array and work on it from there. Here is where I'm stuck:
It seems to me that I should be able to subtract my offset from the end of the array then start from A (ASCII 65) and add up until I've hit the end of the array. However, right now if I put the correct (non-offset) alphabet in and create offset of 3 instead of the alphabet ending with WXYZABC. It ends with WXYZD. I don't understand why my code doesnt work. I can make it say WXYZA by putting in manual offsets in the for loop but it wont print out anything beyond the first character.
Thanks for the help.