Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. // Example program
  2. #include <iostream>
  3. #include <string>
  4. using namespace std;
  5.  
  6. class SystemOne{
  7. private:
  8. string userid;
  9. string password;
  10. public:
  11.  
  12. SystemOne(){
  13. cout<<"================================\n";
  14. cout<<"==============LOGIN=============\n";
  15. cout<<"================================\n";
  16.  
  17.  
  18. cout<<"==========ENTER USERID=========\n";
  19. getline(cin, userid);
  20. cout<<"=========ENTER PASSWORD========\n";
  21. getline(cin, password);
  22.  
  23. //userid must be 'admin' and password must be 'admin'
  24. if( userid == "admin" && password == "admin" ){
  25.  
  26. cout<<"======================WELCOME!===================\n";
  27.  
  28. } else {
  29.  
  30. cout<<"LOGIN ERROR!\n";
  31.  
  32.  
  33.  
  34. }
  35.  
  36.  
  37. }
  38.  
  39. };
  40.  
  41. int main()
  42. {
  43. SystemOne s;
  44.  
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement