I dont understand how is sample output : vool dliow | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

I dont understand how is sample output : vool dliow

Cod cach : "secrate message: Task: Create a program that replaces each letter in a message with its corresponding letter in a backwards version of the English alphabet. Input Format: A string of your message in its normal form. Output Format: A string of your message once you have encoded it (all lower case). Sample Input: Hello World Sample Output: svool dliow

4th Jan 2021, 5:17 PM
Sajid Ali
Sajid Ali - avatar
5 Answers
+ 4
Edit Sajid Ali I just posted the answer based on your code. Sorry for misunderstanding 🙏 You should mention that it's the code coach problem "Secret message" and post the appropriate code. The task said: "Create a program that replaces each letter in a message with its corresponding letter in a backwards version of the English alphabet. " So according to task, a = z h = s e = v . . and so on..
5th Jan 2021, 1:20 AM
Mouli
Mouli - avatar
+ 1
I just try to make reverse string but.. Look.. ..https://code.sololearn.com/ci9cL7aX18s2/?ref=app
4th Jan 2021, 5:26 PM
Sajid Ali
Sajid Ali - avatar
+ 1
Minho 🇰🇷 i knew that,,, See my question abobe said!.. If i am input : "hello world" Output : dlrow olleh But above said sample output : svool dliow
5th Jan 2021, 3:26 AM
Sajid Ali
Sajid Ali - avatar
0
Sajid Ali, show your attempt...
4th Jan 2021, 5:22 PM
Dino Wun (Use the search bar plz!)
Dino Wun (Use the search bar plz!) - avatar
0
Um, I think this thing, needs to be added to reverse text: byte[] strAsByteArray = text.getBytes(); byte[] result = new byte[strAsByteArray.length]; And you are printing text over an array: The solution: for (int i = 0; i < strAsByteArray.length; i++) { result[i] = strAsByteArray[strAsByteArray.length - i - 1]; System.out.println(new String(result)); } I hope this works....
4th Jan 2021, 5:50 PM
Dino Wun (Use the search bar plz!)
Dino Wun (Use the search bar plz!) - avatar