Noufb7700 B.

asked • 04/13/17

can someone please answer my question about java script pig layin loop ?

input: nouf chapter
//start
system.out.println("Enter a list of words ending in ' .':");
String word=input.next()
String first=word.substring(0,1);
while(!first.contains(".")){
if("aeiou".contains(first)){
System.out.print(word+""yay"");
}else{
int p=1
while (p<word.length()&&
!"aeiouy".contains(word.substring(p,p+1))
p++;
System.out.print(word.substring(p)+word.substring(0,p)+"ay");
}
word =input.next()
first = word.substring(0,1);
}
//end
 
 
 
Java script , Pig latin Loop 
HELP :(

1 Expert Answer

By:

Patrick B. answered • 07/16/19

Tutor
4.7 (31)

Math and computer tutor/teacher

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.