Conversation
Notices
-
Embed this notice
so i don't really have a clue on why this could be happening
but I've been trying to beat the very new [as of some 2000 years ago] and difficult to beat Caesar cipher with this program. but for some reason i keep getting truncated strings after some runs.
anyone know why this could be happening?
-
Embed this notice
ended up finding the solution
for loop in shiftletter did not account for strlen just returning length and not last index
l == i - 1
and i never accounted for capital letters so i made a copy of if with the alphabet replaced with a capped alphabet
-
Embed this notice
@kirby In your shiftletter function you are never reaching a state where i == l is true since your for loop stops executing before that happens. It'd probably be better just to do 'letter++' and set it back to 'a' if it's greater than 122 or 'z' instead of doing that for loop stuff.
-
Embed this notice
@postemples holy crap if i had known ascii already organized them by alphabet i wouldve just done something with that instead tysm