• Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

C++ A LOGIN INTERFACE FOR MAYBANK USER ACCOUNT

brianjoe

New Coder
#include<iostream>
#include<Windows.h>
#include<string>
using namespace std;

//Brian Joe Gabriel, a simple login and registration page demo for maybank company//
// No.tel - 0166751407//


void login_page(string& user_name, string& password)
{
string username, pwd;
cout << "\n\n\nMaybank Registration Page\n";
cout << "Please key-in your username :";
getline(cin, username);
cout << "Please key-in your password :";
getline(cin, pwd);
while (username != user_name && pwd != password)
{
cout << "\nThe user data is invalid\n";
cout << "Please key-in your username :";
getline(cin, username);
cout << "Please key-in your password :";
getline(cin, pwd);
}
cout << "\nSUCCESFULLY LOGGED IN\n";
}

void welcome_page(string &firsttime,string &user_name,string &password, string& pwd, string& username)
{
int i;
cout << "Welcome to Maybank App\n";
for (i = 3; i > 0; i--)
{
Sleep(1000);
}
cout << endl << endl;
cout << "Dear user, are you using this application for the first time?";
getline(cin, firsttime);
cout << endl << endl;
if (firsttime == "yes" || firsttime == "YES" || firsttime == "Yes")
{
cout << "Hello,dear new user\nPlease fill up the required field to complete the login registration as a Maybank customer \n";
cout << "Please create a username for your account :";
getline(cin, user_name);
cout << "Please create a strong password for your account :";
getline(cin, password);

}
}

int main()
{
string firstlogin,username, username2,pwd, pwd2;
welcome_page(firstlogin,username,pwd,pwd2,username2);
login_page( username, pwd2);
}
 
Top