Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main()
- {
- int ile;
- cin >> ile;
- for(int i = 0; i < ile; ++i)
- {
- bool cyfry = false;
- bool maleLitery = false;
- bool duzeLitery = false;
- bool znakiSpecjalne = false;
- string haslo;
- cin.clear();
- cin.sync();
- getline(cin, haslo);
- if(haslo.size() > 7)
- {
- for(unsigned j = 0; j < haslo.size(); ++j)
- {
- if((haslo[j] > 47) && (haslo[j] < 58))
- cyfry = true;
- else if((haslo[j] > 96) && (haslo[j] < 123))
- maleLitery = true;
- else if((haslo[j] > 64) && (haslo[j] < 91))
- duzeLitery = true;
- else
- znakiSpecjalne = true;
- }
- if(cyfry && maleLitery && duzeLitery && znakiSpecjalne)
- cout << haslo << endl;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement