The program should take the user input for username and compare it with all the usernames in the file.
If username is matched then display a msg that username already exist and exit the program.
If username does not match with the username in the file then the program ask for a password.
I am having difficulty solving this type of problem...
Here is my code. The one in the comment is my problem. I don't know how to loop into the file and compare the user input with each usernames in the file and display a message that the username already exist if it's matched and ask to choose another username.