#include <iostream> #include <cmath> #include <iomanip> #include <conio.h> //getche() icin #include <cstring> //stringler /* run this program using the console pauser or add your own getch, system("pause") or input loop */ using namespace std; ///////////////////////////////////////////////////// ///////////////////////////////////////////////////// int main(int argc, char** argv) { char username[20],password[20]; char id[]="Username"; char pw[]="Password"; cout<<"\n\n Welcome :)\n"; for(int a=2;a>=0;a--){ cout<<"\n\nYour Username: "; gets(username); cout<<"Your Password: "; gets(password); if(strcmp(id,username)==0 && (pw,password)==0){ cout<<"Success!"; cout<<"\n\Connecting..."; break; } else{ cout<<"\nWrong entry"; } if(a!=0) cout<<endl<<a<<" tries left"; else cout<<endl<<"Your account is blocked for 1 day"; } }
if(strcmp(id,username)==0 && (pw,password)==0){
(pw,password)==0
if(strcmp(id,username)==0 && strcmp(pw,password)==0){
(pw,password) == 0
password
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)