CPP
cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*Password blue validator
Rules-
Password should be between 6 to 14 characters
atleast one small letter,one capital letter and one number should be used*/
#include <iostream>
using namespace std;
int main() {
string str;
int small=0,capital=0,numerical=0;
cout<<"Enter the password"<<endl;
getline(cin,str);
if(str.length()<6)
cout<<"The entered password is too short(min 6 charachters)"<<endl;
else if(str.length()>14)
cout<<"The entered password is too long(max 14 charachters"<<endl;
else{
for(int i=0;i<str.length();i++){
if(str[i]>='a'&&str[i]<='z')
small++;
else if(str[i]>='A'&&str[i]<='Z')
capital++;
else if(0<=str[i]<=9)
numerical++;
}
if(small==0)
Enter to Rename, Shift+Enter to Preview
OUTPUT
Uruchom