+ 1

Hi.. How can I write a program in c++ that can accept a particular password and if not that password then incorrect password...?

https://www.sololearn.com/discuss/1145740/?ref=app

18th Mar 2018, 1:42 AM
Victor Nwafor
Victor Nwafor - avatar
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";
18th Mar 2018, 3:39 AM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar
0
Thanks brother
22nd Dec 2018, 10:08 PM
Victor Nwafor
Victor Nwafor - avatar