-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathauthentication.cpp
More file actions
52 lines (36 loc) · 865 Bytes
/
authentication.cpp
File metadata and controls
52 lines (36 loc) · 865 Bytes
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
51
52
#include <iostream>
using namespace std;
void feilds(){
int i = 5;
while (true){
i--;
string user_name;
user_name = "saad";
string password ;
password = "admin123";
string input_username ;
string input_password;
cout <<"\nEnter here username: ";
cin>>input_username;
cout<<"Enter here password: ";
cin>>input_password;
if(input_username == user_name && input_password == password){
cout<<"Login sucsselfull";
break;
}
else if(i == 0){
cout<<"you entered multiple time wrong deatil check again 30min after \n";
break;
}
else if(i < 3){
cout<<"\nyou entered three time worng deatils you have "<<i <<" more time left\n";
}
else{
cout<<"Login feild try again\n";
}
}
}
int main(){
feilds();
return 0;
}