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
1.5
2B
Merge Sort in Java
Wenfeng Ou
hw1p1
Elevator Sim
Reverse a Linked List in groups of given size k
pre
Shortest distance between words
은행 입출금