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
JLF
1st
document
PE #10
Print out perfect numbers 0 – 10,000
Borrowing class
qwe
test1
상속1
1.6