+ 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
7 ответов
+ 1
Calvin Thomas great man :)
+ 2
When I entered "test this", the return was "estay histay".
The return should be:
"esttay histay"
Hope this helps you find the bug
+ 2
Shahid Iqbal
You got it?
Well done!
+ 1
Kamil Hamid there no code like I want user to check my code and tell what's is the problem in it :)
+ 1
Rik Wittkopp let me go through code again
+ 1
Rik Wittkopp yes I solve the problem thanks alot for the help ❤
+ 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