+ 1

Doubts about the number of times in the Membership test

https://code.sololearn.com/cif4yWnX56YJ This is a code that I wrote today I want to check the password of the account number three times. but this code allows four attempts, what went wrong?

21st Jul 2017, 2:27 AM
Roy
Roy - avatar
2 Answers
+ 3
You asked before the loop started. I suggest using a do while. Or, fix by just leaving username and pin undeclared before the loop. username = ""; pin = "";
21st Jul 2017, 2:42 AM
Rrestoring faith
Rrestoring faith - avatar
+ 1
thanks very much!
21st Jul 2017, 2:56 AM
Roy
Roy - avatar