I do not control?? do so each independent encryption if uppercase text and key do this if key lowercase text and do this if uppercase - lowercase text and key do this if lowercase - uppercase text calve do this.
My fault was in the "for", you have to read the string to be encrypted, and move j, independent ... I hope this helps someone will have compilation errors for punctuation signs, blanks are characters, etc. .