Computer Science, asked by rajs69922, 11 months ago

Question 9.
Write a program to input a string and convert it into uppercase and print the pair of
vowels and number of pair of vowels occurring in the string.
Example:
Input:
"BEAUTIFUL BEAUTIES "
Output :
Pair of vowels: EA, AU, EA, AU, IE
No. of pair of vowels: 5


maihuterimaa: ghj

Answers

Answered by sanchari46
25

Heya Mate here is ur answer...

Hope it helps ❤❤❤❤

Attachments:

rishitgrg: Hello
Answered by ridhimakh1219
36

Write a program to input a string and convert it into uppercase and print the pair of  vowels and number of pair of vowels occurring in the string.

Explanation:

Function to check character is vowel or not:

   public static boolean checkVowel(char ch) {

       if (ch == 'A' || ch == 'E' || ch == 'I' || ch == 'O' || ch == 'U') {

           return true;

       } else {

           return false;

       }

   }

OUTPUT

Enter any string- beautiful beauties

Pair of vowels: EA

Pair of vowels: AU                                                                            

Pair of vowels: EA                                                                            

Pair of vowels: AU                                                                            

Pair of vowels: IE                                                                              

No. of pair of vowels: 5

Please find attached program in Java

Attachments:
Similar questions