alexon5519

41-programare

May 13th, 2018
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. #include <iostream>
  2. #include<fstream>
  3. #include<string.h>
  4. #include<stdio.h>
  5. #include<stdlib.h>
  6.  
  7. using namespace std;
  8.  
  9. int main(){
  10. ifstream f1("atestat.in");
  11. ofstream f2("atestat.out");
  12. char n[100];
  13. int i,c=0;
  14.  
  15. f1.getline(n,100);
  16. strupr(n);
  17. cout<<n<<endl;
  18. for(i=0;i<strlen(n);i++)
  19. if(n[i] >= 'A' && n[i] <= 'Z' && (n[i] != 'A' && n[i] != 'E' && n[i] != 'I' && n[i] != 'O' && n[i] != 'U' ))
  20. c++;
  21. f2<<c;
  22. f1.close();
  23. f2.close();
  24. }
Add Comment
Please, Sign In to add comment