Advertisement
Guest User

Untitled

a guest
Aug 30th, 2015
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.41 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int is_cons(int c) {
  5.   return isalpha(c) && c != 'A' && c != 'E' && c != 'I' && c != 'O' && c != 'U' && c != 'Y'
  6.     && c != 'a' && c != 'e' && c != 'i' && c != 'o' && c != 'u' && c != 'y';
  7. }
  8.  
  9. int main() {
  10.   int c;
  11.  
  12.   while(!feof(stdin) && !ferror(stdin) && c != '\n') {
  13.     c = fgetc(stdin);
  14.     if(is_cons(c))
  15.       printf("%co", c);
  16.     printf("%c", c);
  17.   }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement