Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
piglatin
//'main' method must be in a class 'Rextester'. //openjdk version '11.0.5' import java.util.*; import java.lang.*; class Rextester { public static void main(String args[]) { char ch; String ss; int i,ln,p=-1; Scanner sc = new Scanner("System.in"); System.out.println("Enter the string"); ss=sc.nextLine(); ln=ss.length(); for(i=0;i<ln;i++) { ch=ss.charAt(i); if(ch=='a'||ch=='e'||ch=='i'||ch=='o'||ch=='u') { p=i; break; } } if (p==-1) System.out.println(ss); else System.out.println(ss.substring(p)+ ss.substring(0,p)+"ay"); } }
run
|
edit
|
history
|
help
0
toma!
Max Repeated Number in array
multiplo de 4 y 6
AllStar
3
Homework
Piramid
Java recursive test
default constructor
1a