Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main()
- {
- const string USERNAME = "arvin";
- const string PASSWORD = "123456";
- string username, password;
- cout << "Enter Username : ";
- cin >> username;
- if (username.length() < )
- {
- cout << "Username length must be atleast 4 characters long.";
- }
- else
- {
- cout << "Enter Password : ";
- cin >> password;
- if (password.length() < 6)
- {
- cout << "Password length must be atleast 6 characters long.";
- }
- else
- {
- if (username == USERNAME && password == PASSWORD)
- {
- cout << "User credentials are correct!!!" << endl;
- }
- else
- {
- cout << "Invalid login details" << endl;
- }
- }
- }
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement