#include <stdio.h>
#include <string.h>

int count_the_vowels(char buff[]) {
  int consonants = 0;
  for(int i = 0;i<strlen(buff);i++) {
    if ( (buff[i] >= 'A' && buff[i] <= 'Z') || (buff[i] >= 'a' && buff[i] <= 'z') ) {
      switch (buff[i]) {
      case 'A':
      case 'a':
      case 'E':
      case 'e':
      case 'I':
      case 'i':
      case 'O':
      case 'o':
      case 'U':
      case 'u': {
	  break; 
	}
      default:
	consonants++;
      }
    }
  }
  return (consonants);
}

int main() {
  char buff[] = "A String to operate on";
  int consonants = 0;

  consonants = count_the_vowels(buff);
  printf("Number of consonants in string %s is %d\n",buff,consonants);
  return (0);
}
