Please im new hear how can i creat a loop that will require the user to keep inputting a password till he types what i want | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Please im new hear how can i creat a loop that will require the user to keep inputting a password till he types what i want

like a password that will require the user input to get it

4th Oct 2018, 11:03 PM
tobe kingsley
2 Answers
0
You can use the infinite loop, and in it Check if the given password is correct you leave the loops The loop should look like this while(true) { userPassword if(user Password = entryPassword) { break; } }
5th Oct 2018, 3:53 AM
Daniel (kabura)
Daniel (kabura) - avatar
0
thanks
5th Oct 2018, 7:26 AM
tobe kingsley