+ 1

Please some one help me solve that "Pig Latin" .

I tried all solutions but always got error in test 3 and 5 . https://code.sololearn.com/cc6FgV0ia1p6/?ref=app

24th Jul 2021, 8:24 AM
Shahid Iqbal
Shahid Iqbal - avatar
7 ответов
+ 1
Calvin Thomas great man :)
24th Jul 2021, 6:26 PM
Shahid Iqbal
Shahid Iqbal - avatar
+ 2
When I entered "test this", the return was "estay histay". The return should be: "esttay histay" Hope this helps you find the bug
24th Jul 2021, 8:42 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 2
Shahid Iqbal You got it? Well done!
24th Jul 2021, 9:01 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 1
Kamil Hamid there no code like I want user to check my code and tell what's is the problem in it :)
24th Jul 2021, 8:47 AM
Shahid Iqbal
Shahid Iqbal - avatar
+ 1
Rik Wittkopp let me go through code again
24th Jul 2021, 8:50 AM
Shahid Iqbal
Shahid Iqbal - avatar
+ 1
Rik Wittkopp yes I solve the problem thanks alot for the help ❤
24th Jul 2021, 9:01 AM
Shahid Iqbal
Shahid Iqbal - avatar
+ 1
Shahid Iqbal Here's a shorter version: import java.util.Scanner; public class Java { public static void main(String[] args) { Scanner p = new Scanner(System.in); String t[] = p.nextLine().split(" "); for (String x: t) { for (int y = 1; y < x.length(); y++) { System.out.print(x.charAt(y)); } System.out.print(x.charAt(0) + "ay "); } } } // Hope this helps
24th Jul 2021, 3:02 PM
Calvin Thomas
Calvin Thomas - avatar