0

Output problems again.

For some reason my two outputted strings keep mixing together. Where did I make a mistake? https://code.sololearn.com/c9Ju5NyFz578

23rd Nov 2021, 8:54 PM
OverdrivedProgrammer
3 Respuestas
+ 4
Hello OverdrivedProgrammer Can you please share your code?
23rd Nov 2021, 8:59 PM
Denise Roßberg
Denise Roßberg - avatar
+ 2
in makeEncryption() you assigned NumKey to Code Code = Code + NumKey[a] + "-"; if you have text to encrypt A B C D E F G H encrypted text is same as Letters because alphabet order is used as index in LetKey[] then in decrypt() you copy encrypted text to the end of Code But Code is not empty because there are NumKey[] elements added before: currentChar = text.charAt(i); Code = Code + currentChar;
24th Nov 2021, 1:17 AM
zemiak
+ 1
Added the code.
23rd Nov 2021, 9:35 PM
OverdrivedProgrammer