title: Vowel counting code issues
body: <p>I'm having trouble getting this program to work, can someone take a look at it and give me a clue on what to do? Thanks!</p>
  <blockquote>
  <p>Design and implement an application that reads a string  from the user, then determines and prints how many of each lowercase vowel (a, e, i, o, and u) appear in the entire string . Have a separate counter for each vowel. Also count and print the number of nonvowel characters .</p>
  <p>SPECIFICATION OF PROMPTS, LABELS AND OUTPUT : Your code should use the prompt &quot;enter string : &quot;. After the input is read, there are six lines of output , each starting with a different label: &quot;a: &quot;, &quot;e: &quot;, &quot;i: &quot;, &quot;o: &quot;, &quot;u: &quot;, &quot;other: &quot; in that order. After each label is the required count.</p>
  <p>For example: if &quot;aardvark heebie jeebies&quot; were read in, the output  would be:</p>
  </blockquote>
  <pre><code>a: 3
  e: 6
  i: 2
  o: 0
  u: 0
  other: 12
  </code></pre>
  <hr />
  <pre><code>    import java.util.Scanner;
      public class VowelAnalyst{
  
  
      public static void main(String args []){
  
      int a =0, e = 0, x = 0;
      int u = 0, o = 0, other = 0;
      String text;
      Scanner scan = new Scanner(System.in);
  
  
      System.out.print(&quot;enter string: &quot;);
      text = scan.nextLine();
  
      for (int i = 0; i &lt; text.length(); i++) {
      char c = text.charAt(i);
  
      if (c=='a')
      a++; 
  
      else if( c=='e')
      e++;
  
      else if(c=='i')
      x++;
  
      else if(c=='o')
      o++;
  
      else if (c=='u')
      u++;        
  
      else
      other++;
      }
  
      System.out.println(&quot;a: &quot; + a + &quot;\n&quot; +
      &quot;e: &quot; + e + &quot;\n&quot; +
      &quot;i: &quot; + x + &quot;\n&quot; +
      &quot;o: &quot; + o + &quot;\n&quot; +
      &quot;u: &quot; + u + &quot;\n&quot; +
      &quot;other: &quot; + other);
  
      }
      }
  </code></pre>