Advertisement
Guest User

vocale

a guest
Jan 16th, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.55 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstring>
  3. #include<fstream>
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     char s[250];
  9.     ifstream fin ("intrare.txt");
  10.     ofstream fout ("iesire.txt");
  11.     int k = 0,ok=0;
  12.     while(!fin.eof())
  13.     {
  14.         fin.get(s,249);
  15.         fin.get();
  16.         ok=0;
  17.  
  18.         for(int i=0; i < strlen(s)&&!ok; i++)
  19.         {
  20.             if (strchr("aeiouAEIOU", s[i]))
  21.             {
  22.                k++;
  23.                ok=1;
  24.             }
  25.         }
  26.     }
  27.  
  28.     fout<<k;
  29.     fin.close();
  30.     fout.close();
  31.     return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement