0

Please help

So according to the "Secret message" quiz. I have to inverse the input of the user (input:String) I made the code but for some reason the output appears to be wrong in the results section. although I tried it in the code playground and it worked well. My code works by comparing each letter with an array of all the alphas. Once it finds a match, it takes the index of the alphabet and takes its inverse from another alphabets array that is inverted from the first one. https://code.sololearn.com/cf2u82OrNyxB/?ref=app

11th Jan 2020, 9:00 PM
Ishaq Za'rour
11 Answers
+ 6
https://code.sololearn.com/cLJtS71Vf03z/?ref=app
12th Jan 2020, 7:19 AM
Saroj Patel
Saroj Patel - avatar
+ 6
Instead of using arrays you can go with collections that maybe helpful to solve this kind of problem !! !! !!
13th Jan 2020, 5:57 PM
0_O-[MĂ€gĂĄr_SĂĄm_ÄkĂ _NĂŒllpÞïntĂȘr_ÈxĂ«cĂ©ptïön]~~
0_O-[MĂ€gĂĄr_SĂĄm_ÄkĂ _NĂŒllpÞïntĂȘr_ÈxĂ«cĂ©ptïön]~~ - avatar
+ 2
Tibor Santa how haven't i noticed that haha thank you
11th Jan 2020, 9:11 PM
Ishaq Za'rour
+ 1
You should convert the input to lowercase characters first. Capitals are not mapped. String input=sc.nextLine().toLowerCase();
11th Jan 2020, 9:10 PM
Tibor Santa
Tibor Santa - avatar
+ 1
Then also just covert lover case. You will get it...
11th Jan 2020, 9:18 PM
Jayakrishna 🇼🇳
+ 1
Jayakrishna yeah I just didn't notice that 😅
11th Jan 2020, 9:19 PM
Ishaq Za'rour
+ 1
0_0 MĂ€gĂĄr SĂĄm ÄkĂ  NĂŒllpÞïntĂȘr ÈxĂ«cĂ©ptïön Its been time i have'nt coded anything and i'm trying to do some small codes here and there to refresh my memory haha
13th Jan 2020, 9:25 PM
Ishaq Za'rour
0
In which case, it is failing? It seems giving the correct output..
11th Jan 2020, 9:08 PM
Jayakrishna 🇼🇳
0
Its failing the second case Jayakrishna
11th Jan 2020, 9:08 PM
Ishaq Za'rour
0
Is this code for code coach problem reverse string?
11th Jan 2020, 9:11 PM
Jayakrishna 🇼🇳
11th Jan 2020, 9:12 PM
Ishaq Za'rour