Deleting Vowels

Description:

Vowels includes only five letter that give great trouble to us. They are mingled with other letters in a string. Shanthi has a task to filter vowels from that string. Help her to do this task. Test Case 1 Input (stdin) hai Expected Output h Test Case 2 Input (stdin) man Expected Output mn

Program :

#include<stdio.h>

#include<string.h>

#include<stdlib.h>

  int main()

{

  char str[30],str1[30],c;

  int i,count=0;

  scanf ("%[^\n]s",str);

  for(i=0;i<strlen(str);i++)

{

  c=str[i];

  if(c!='a' && c!='e' && c!='i' && c!='o' && c!='u')

{

  str1[count++]=str[i];

}

}

  str1[count]='\0';

  printf("%s",str1);

    return 0;

  }