Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

This program can count number of vowels in a sentence but only ifthey are lower

ID: 3614394 • Letter: T

Question

This program can count number of vowels in a sentence but only ifthey are lower case.I don't know how l can make it to also countuppercase vowels.

import javax.swing.*;

public class ExamPractise
{
    public static void main (String [] geek)

    {
        String sentence =JOptionPane.showInputDialog("Enter a any sentence");

        int countVowels=0;
        int countSentences=0;
        int countWords=0;
        int countCharacters;



       for (int i = 0; i <sentence.length(); i++)
       {
           char c =sentence.charAt(i);

           if (c=='a' ||c=='e' || c=='i' || c=='o' || c=='u')
           {
              countVowels++;
           }


       }


        System.out.println("There are" + " " + countVowels + " " +"vowels");


    }
}


Explanation / Answer

for (int i = 0; i
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote