title: Count Vowel and Consonant C#
body: <p><strong>Question</strong></p>
  
  <p>Take input of 1 character from user. It can be the vowel or consonant.
  After the user gives input so it will ask do you want to input the character again for Yes press Y and for No press N.</p>
  
  <p>When the user says No, you have to show how much vowel and how much consonant use has input.</p>
  
  <p>Please do this question using For loop. I think array must be use. I did this code it counting vowel and consonant and spacing. But I cant take the input multiple times.</p>
  
  <p>My code doesnn't run multiple times. I can only write sentence or a character in a line so it will only count that. But I want to ask the user to enter a character again. </p>
  
  <p>I want my code to run multiple times so the user can give input multiple times as I explain my question.</p>
  
  <pre><code>    using System;
  public class vowelConsonant
  {
      public static void Main()
      {
          int vowels = 0;
          int consonant = 0;
          int space = 0;
  
          Console.WriteLine("Enter a Sentence or a Character");
          string v = Console.ReadLine().ToLower();
  
          for (int i = 0; i &lt; v.Length; i++)
              {
                  if (v[i] == 'a' || v[i] == 'e' || v[i] == 'i' || v[i] == 'o' || v[i] == 'u')
                  {
                      vowels++;
                  }
  
                  else if (char.IsWhiteSpace(v[i]))
  
                  {
                      space++;
                  }
  
                  else
                  {
                      consonant++;
                  }
          }
  
          Console.WriteLine("Your total number of vowels is: {0}", vowels);
          Console.WriteLine("Your total number of constant is: {0}", consonant);
          Console.WriteLine("Your total number of space is: {0}", space);
          Console.ReadLine();
      }
  }
  
  Thanks
  </code></pre>