-
Notifications
You must be signed in to change notification settings - Fork 1
/
Password.h
50 lines (40 loc) · 1.17 KB
/
Password.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#include <iostream>
#include <string>
#include <conio.h>
using namespace std;
int PassWord()
{
int n = 3;
int ind = 0;
while (n--)
{
string user;
string pass;
system("cls");
cout << "\t\t################################### Verify YourSelf ###################################" << endl;
cout << "\n\nEnter Username : ";
cin >> user;
cout << "\n\nEnter PassWord : ";
cin >> pass;
if (user != "knockcat" || pass != "1234")
{
++ind;
cout << "\n\n\t\t!!! ################################ Invalid Credential ################################ !!!\n"
<< endl;
continue;
}
if (user == "knockcat" && pass == "1234")
{
system("cls");
cout << "\t\t\n\n****************************** Logged In Successfully ******************************" << endl;
break;
}
}
if (ind == 3)
{
cout << "\t\t------------------------------------ Returning to Main Window ------------------------------------" << endl;
// getch();
return 1;
}
return 0;
}