#why my last "else if" doesn't work ?
1 messages · Page 1 of 1 (latest)
I uploaded your attachments as Gist. This makes them more accessible, for example to mobile users.
I'm unclear what you expect.
In the submitted code it looks like you do...
password = scanner...
if (password correct) {
...
filename = scanner...
if (filename correct) {
...
} else if (password equals itself) {
...
}
}
do you want while loop to run forever?
Think about trying to write out what you want to happen in words, ignoring the code...
eg
Until the user has entered a valid password
* prompt for the password
* check that the password is valid
* if it is valid continue with the program
* other keep prompting them
Now that we have a valid user...
sorry yall for not reading immediatly, i was busy
im free now to answer when you read this
so whats the problem
@dapper spade you don't need to wait for us to be available to give more information. You likely live in a completely different timezone to some of the helpers, so waiting for time-alignment limits you to a much smaller pool of helpers.
yeah thats the reason im not avaible always, ok so the problem is that when i always put the password wrong it usally said "wrong password, please retry" but if i add that while and add another simbol to the end of the file, the else if of the wrong password message stop working
sorry for not answering again, time zone problem
try to talk to an AI if u have problems contacting with us