Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 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. cout<<"============ENTER USERID =============\n";
  18. getline(cin, userid);
  19. cout<<"============ENTER PASSWORD ===========\n";
  20. getline(cin, password);
  21.  
  22. // userid must be 'admin' and password must be 'admin'
  23.  
  24. if( userid == "admin" && password == "admin" ){
  25.  
  26. cout<<"==================WELCOME====================\n";
  27.  
  28. } else {
  29. cout<<"LOGIN ERROR!\n";
  30. }
  31. }
  32.  
  33. };
  34.  
  35. int main()
  36. {
  37. SystemOne s;
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement