title: How can I count how many lowercase, uppercase and other characters I have in my string properly?
body: <p>My code here represents the counting of all lowercase and uppercase letter, but I'm having trouble counting all other characters. Other characters consist of spaces and symbols like '!@$^%$'. Anything that isn't lowercase or uppercase refers to other.</p>
  
  <p>However, my problem is that my other is counting uppercase and I can't seem to work the code out. </p>
  
  <p>I do not know where I'm going wrong so any help would be appreciated, thanks!</p>
  
  <pre><code>Console.WriteLine("Enter a sentence: ");
  string sentence = Console.ReadLine();
  int countUpper = 0, countLower=0, countOther=0, i;
  
  
  
          for (i = 0; i &lt; sentence.Length;i++ )
          {
              if (char.IsUpper(sentence[i])) countUpper++;
              if (char.IsLower(sentence[i])) countLower++;
              if (!(char.IsLower(sentence[i]) || (!(char.IsUpper(sentence[i]))))) countOther++;
  
          }
          Console.WriteLine("Lower: " + countLower);
          Console.WriteLine("Upper: " + countUpper);
          Console.WriteLine("Other: " + countOther);
  </code></pre>