Advertisement
Guest User

Untitled

a guest
Feb 24th, 2014
221
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.  
  3. int main(){
  4.     FILE *f=fopen("uberspeedtest.in","r");
  5.     char ch,vowels[100000];
  6.     unsigned n_vowels=0,i;
  7.  
  8.     while(fscanf(f,"%c",&ch)!=EOF){
  9.         if(ch==' ') continue;
  10.         else    if(ch=='e' || ch=='a' || ch=='o' || ch=='i' || ch=='u') vowels[n_vowels++]=ch;
  11.         else    printf("%c",ch);
  12.     }
  13.     vowels[n_vowels]='\0';
  14.  
  15.     printf("%s",vowels);
  16.  
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement