+ 1

Does this password code i created work?

I'm on mobile at the moment and am unable to test properly. could someone help me out? https://code.sololearn.com/c154c98Rk3aN/?ref=app https://code.sololearn.com/c154c98Rk3aN/?ref=app

11th Jun 2017, 5:54 PM
X-1
X-1 - avatar
2 Antworten
+ 3
You have one problem in the code. Inside the if statement you have cout == "Yourpass" where you really meant input == "Yourpass" Another key point is that the user can only enter 2 times the password(maybe that was what you needed). To have infinitely many takes on the password, you have to insert it in an infinite loop, and break it when the password is correct. Here is the code https://code.sololearn.com/c0Ts2oNLwc0r/?ref=app
11th Jun 2017, 6:21 PM
Madera Oxidada
Madera Oxidada - avatar
+ 1
In line 10: Change cout to input
11th Jun 2017, 6:17 PM
Limitless
Limitless - avatar