Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. #include <fstream>
  2. #include<cstring>
  3. using namespace std;
  4. ifstream cin("a.in");
  5. ofstream cout("a.out");
  6. char a[300],aux[300];
  7.  
  8. int n,ok=0,nr=0,st,isl,isu,isd,str;
  9. int main()
  10. {
  11. int n,ok=0,nr=0;
  12. cin>>n;
  13. //cin.get();
  14. for(int i=1;i<=n;i++)
  15. {
  16. cin.getline(a,300);
  17. strcpy(aux,a);
  18.  
  19. for(int i=0;i<strlen(aux);i++)
  20. { if(strlen(aux)>7)st=1;
  21.  
  22.  
  23. if(islower(aux[i]))isl=1;
  24.  
  25.  
  26. if(isupper(aux[i]))isu=1;
  27.  
  28. if(isdigit(aux[i]))isd=1;
  29.  
  30.  
  31. if(strchr(".,?!;:_@#",aux[i]))str=1;
  32.  
  33.  
  34. } if(st && isl && isu && isd && str)nr++;
  35.  
  36.  
  37. }cout<<nr;
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement