a code that presents a good interface for apassword and user name

Where is the beef ;) ?

does any one has the code and how do you come up with it

how do you come up with it

You come up with it by thinking about the problem and developing an algorithm to solve it in a methodical way that is appropriate to being turned into code.

For example, I might look at this and think that the steps will be something like this:

- Get username from user
- Get password from user
- Compare password provided with the correct password for that username
- if same, carry on
- if not same, give error message and quit.