fork download
  1. //Q91. Remove all vowels from a string.
  2. #include <stdio.h>
  3. #include <ctype.h>
  4.  
  5. int main() {
  6. char str[100], res[100];
  7. int i, j = 0;
  8. gets(str);
  9. for(i=0; str[i]!='\0'; i++) {
  10. char ch = tolower(str[i]);
  11. if(ch!='a' && ch!='e' && ch!='i' && ch!='o' && ch!='u')
  12. res[j++] = str[i];
  13. }
  14. res[j] = '\0';
  15. printf("%s", res);
  16. }
  17.  
Success #stdin #stdout 0.01s 5316KB
stdin
education
stdout
dctn