Guys Im trying to make a login program wherein there will be a warning in each attempt and I only have to do 3 attempts. In this program I made no matter what condition I put below it seemed to always put Unsuccesful login 2 attempts more even if the attempt is only down to 1 which is supposed to display Unsuccesful login 1 attempt more ugh help pls :(
it seemed to always put Unsuccesful login 2 attempts more even if the attempt is only down to 1 which is supposed to display Unsuccesful login 1 attempt more
elseif (attempts <=2){
When attempts = 1, this statement will be true and will be executed, hence outputting "Unsuccessful login 2 attempts more."
Uhmm basically it should show 3 attempts when the username and password are invalid. Hence in each attempt there must also be a corresponding warning. I can't get the matrix sir :( Please elaborate it for me I am an extreme beginner!
I realised I made a silly mistake in the code above. Its fixed now.
Uhmm basically it should show 3 attempts when the username and password are invalid. Hence in each attempt there must also be a corresponding warning.
Enter your username:
a
Enter your password:
a
Unsuccessful login 2 attempts more.
Enter your username:
s
Enter your password:
s
Unsuccessful login 1 attempts more.
Enter your username:
d
Enter your password:
d
Unsuccessful login 0 attempts more.
Maximum attempts reached.