So the program I'm writing should count how many of each individual vowel is in the program and then print that.
I'm basically stuck with while and conditional statements. I think my if statement is where I've gone wrong. I'm not sure how to have it read the letter properly and the program didn't compile and I'm not sure why.
Please help! Thank you.
//Project 4.12 by Vivin Viswanathan
import java.util.Scanner;
public class VV_PP412
{
public static void main (String[]args)
{
int cons = 0;
int a,e,i,o,u = 0;
int count = 0;
String sent;
Scanner scan = new Scanner (System.in);
System.out.println("Type out a random string of BS: ");
sent = scan.nextLine();
while (sent.charAt(count) != sent.charAt(sent.length()))
{
count++;
if (sent.charAt(count) == char 'a')
a++;
}
}
}