#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);
}
#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);
}