CONVERT VOWELS OF UPPER CASE TO LOWER CASE


Write a program to input a sentence and convert small letter vowel to capital vowel .

import java.util.*;

public class Count {
public static void main(String[] args) {
String n , s=" " ;int l;char ch,c;
Scanner sc = new Scanner (System.in);
System.out.println("ENTER A STRING : " );
n = sc.nextLine();
l = n.length();
for(int i = 0 ; i<l ; i++)
{
ch = n.charAt(i);
if(ch=='A'||ch=='E'||ch=='I'||ch=='O'||ch=='U'||ch=='a'||ch=='e'||ch=='i'||ch=='o'||ch=='u')
{
if(Character.isLowerCase(ch))
{
c = Character.toUpperCase(ch);
s = s+c;
}
}
System.out.print(s);
}
}
}

FOR CODE ,
CLICK : https://onecompiler.com/java/3xyxwf88w (TO FIND OUTPUT)