Print Friendly and PDF

#include<iostream>

#include<cstdlib>

#include<fstream>

using namespace std;

int main()

{

int sz1=15;

string pas2;

string pas3;

ifstream infile;

static int c=0;

infile.open("passward.txt");

char n2[sz1];

char n3[sz1];

char n4[sz1];

char n5[sz1];

//infile.open("user.txt");

infile>>pas2;

cout<<endl;

infile>>pas3;

for(c=0;c<1;c++)

{

infile>>n2;

//}

//cout<<endl;

// for(c=1;c<2;c++)

//{

infile>>n3;

// }

//for(c=2;c<3;c++)

//{

infile>>n4;

//}

//for(c;c<4;c++)

//{

infile>>n5;

}

infile.close();

char n1[sz1];

string pas1;

cout<<" "<<endl;

cout<<" "<<endl;

cout<<"-----------------LOGIN------------------"<<endl;

cout<<" "<<endl;

cout<<" "<<endl;

cout<<"PLEASE ENTER THE USER NAME "<<endl;

cin.getline(n1,sz1);

system("cls");

cout<<"ENTER THE USER PASSWARED "<<endl;

cin>>pas1;

// if(strcmp(n1,n2)==0&&pas1==pas2||strcmp(n1,n3)==0&&pas1==pas2||strcmp(n1,n4)==0&&pas1==pas3||

// strcmp(n1,n5)==0&&pas1==pas3)

{

cout<< "**** **** * * ******** **************"<<endl;

cout<<"* **** * * * * ***********"<<endl;

cout<<"* **** * * * ********* *************"<<endl;

cout<< "**** *** ********************"<<endl; 

cout<<"congratulation you have been successfully log-in "<<endl;

}

// else

cout<<"you enter either wrong passward or user name "<<endl;

system("pause");

}




zubairsaif

Zubair saif

A passionate writer who loves to write on new technology and programming

Post A Comment:

0 comments: