josiftepe

Untitled

Nov 22nd, 2020
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.22 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5.  
  6.  
  7.  
  8. class LoginMenager {
  9.   public:
  10.  
  11.       LoginMenager(bool acces){
  12.           Give_acces = acces;
  13.       }
  14.  
  15.       void login(){
  16.          
  17.       cout<<"Enter your username"<<endl;
  18.       cout<<""<<endl;
  19.       cout<<"Usrename: ";
  20.       cin>>username;
  21.       string informacii;
  22.  
  23.       if(username==realusername or Give_acces){
  24.         cout<<"Password: ";
  25.         cin>>password;
  26.   if(password==realpassword or Give_acces){
  27.                 cout<<""<<endl;
  28.         cout<<""<<endl;
  29.             cin>>informacii;
  30.             if( informacii == "ip_address" or Give_acces){
  31.                 cout<<"46.217.190.96"<<endl;
  32.             }
  33.             else if(informacii== "licni_informacii"){
  34.                 cout<<"David Miloshoski 13 godini Skopje Makedonija"<<endl;
  35.             }
  36.             else if(informacii== "passwordi" ){
  37.                 cout<<"Error 404"<<endl;
  38.             }
  39.         }
  40.  
  41.  
  42.  
  43.         }
  44.       }
  45.  
  46.   private:
  47.     string username;
  48.       string password;
  49.     string realpassword = "Miloshoski";
  50.     string realusername = "David";
  51.     bool Give_acces;
  52.     };
  53.  
  54. int main()
  55. {
  56.     system("color f3");
  57.    LoginMenager Lm(true);
  58.  
  59.    Lm.login();
  60.  
  61.  
  62. }
  63.  
Advertisement
Add Comment
Please, Sign In to add comment