Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main(){
- int ile;
- cin >> ile;
- for(int j = 0; j < ile; ++j){
- string haslo;
- cin >> haslo;
- int dlugosc = haslo.size();
- int m=0,d=0,c=0,in=0; //m - male, d- duze, c - cyfry, in - inne
- if(dlugosc >=8){
- for (int i=0; i<dlugosc; i++){
- if(haslo[i] >= 'a' && haslo[i] <='z')
- m=m+1;
- if(haslo[i] >= 'A' && haslo[i] <='Z')
- d=d+1;
- if(haslo[i] >= '0' && haslo[i] <='9')
- c=c+1;
- else
- in=in+1;
- }
- if(m && d && c && in){
- cout << endl;
- cout << haslo;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement