+ 1
Hi.. How can I write a program in c++ that can accept a particular password and if not that password then incorrect password...?
2 Answers
0
You use a basic if-else block.
string pw,pwd="hello";
getline(cin,pw);
if(pw==pwd)
cout<<"Access Granted. \n";
else
cout<<"Incorrect Password. \n";
0
Thanks brother