Write the JAVA program that reads a string with a maximum length of 30 from the keyboard. The program should then copy the characters from that input string into a second character array (in order of input). However, only if a character is a vowel (a, e, i, o, u) should it be copied into the second array. Once copied, the program should output the values stored in the second array (in order of input). The program should then count and display the number of times each vowel appears in the second array. Also, the program should determine and output the index in the second array where each vowel first appeared or display a suitable message if a particular vowel is not in the array at all.
Write the JAVA program that reads a string with a maximum length of 30 from
the keyboard. The program should then copy the characters from that input
string into a second character array (in order of input). However, only if a
character is a vowel (a, e, i, o, u) should it be copied into the second array.
Once copied, the program should output the values stored in the second array
(in order of input). The program should then count and display the number of
times each vowel appears in the second array. Also, the program should
determine and output the index in the second array where each vowel first
appeared or display a suitable message if a particular vowel is not in the array
at all.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 5 images