You are on page 1of 2

void disply(string num);

void inputdata(void);
void Quit();
// Record structure
struct course
{
string cid;
string cnam;
string cstart;
int fee;
string cduration;
}carry[3];
// Main Program of the Student Information System
void main()
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 11);
cout<<"* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * *"<<endl;
cout<<"*****************************************************************
************"<<endl;
cout<<"*****************************************************************
************"<<endl;
cout<<"*
*"<<endl;
cout<<"* **
**
***
**** ***** ***** ****
**
** ***** **
* **** *"<<endl;
cout<<"* * * * * * * *
* *
* *
* * * * * *
* * * * *"<<endl;
cout<<"* * ** * ******* ***
* *** ****
* ** * * *
* * * * *"<<endl;
cout<<"* *
* *
*
* * *
* *
*
* * *
** * * *"<<endl;
cout<<"* *
* *
* ****
* ***** * *
*
* ***** *
* **** *"<<endl;
cout<<"*
*"<<endl;
cout<<"*
***** WELLCOME TO MASTER MIND INSTITUTE*****
*"<<endl;
cout<<"*****************************************************************
************"<<endl;
cout<<"*****************************************************************
************"<<endl;
cout<<"\n";
cout<<"-------------------------------------------------------------------------"<<endl;
login();
system("pause");
}
/* Login program of the system.
In this login program users and the adminstrator can login to their programs
separately. */
void login()
{
string username,password;

int counter=3;
do
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 14);
cout<<"<<<>>> MASTER MIND USER LOGIN <<<>>>"<<endl;
cout<<"\n";
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 15);
cout<<"Enter your username:";
cin>>username;
cout<<"\n";
cout<<"Enter password:";
cin>>password;
cout<<"\n";
if((username=="mastermind")&&(password=="mind"))
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 10);
cout<< " login Succeed"<<endl;
cout<<"\n";
break;
cout<<"\n";
}
else if((username=="administrator")&&(password=="admin"))
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 10);
cout<< "Administrator login Succeed"<<endl;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 15);
cout<<"\n";
inputdata();
cout<<"\n";
char opt;
cout<<"Do you want to log out y/n:"<<endl;
cin>>opt;
cout<<"-------------------------------------------------------------------------"<<endl;
if(opt=='y')
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),
9);
login();
}
else
{
inputdata();
}
cout<<"\n";
break;
cout<<"\n";
}

You might also like