PHP Exercises: 05. Login
05. Login
You will be given a string representing a username. The password will be that username reversed. Until you receive the correct password print on the console "Incorrect password. Try again.". When you receive the correct password print "User {username} logged in." However on the fourth try if the password is still not correct print "User {username} blocked!" and end the program.
Examples
Input |
Output |
Acer login go let me in recA
|
Incorrect password. Try again. Incorrect password. Try again. Incorrect password. Try again. User Acer logged in.
|
momo omom |
User momo logged in. |
sunny rainy cloudy sunny not sunny |
Incorrect password. Try again. Incorrect password. Try again. Incorrect password. Try again. User sunny blocked! |
Това ми е кода: https://pastebin.com/40if1g6i , Judge дава 33/100. Някакви предложения?
Така е, Counter-а ми беше проблем.