Advertisement
Guest User

asdsad

a guest
Jan 31st, 2015
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.98 KB | None | 0 0
  1. // Practise 2 site 73.cpp : Defines the entry point for the console application.
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include <string>
  6. #include <iostream>
  7. #include <Windows.h>
  8.  
  9. using namespace std;
  10.  
  11.  
  12.  
  13. int _tmain(int argc, _TCHAR* argv[])
  14. {
  15.     string username1, username2, password1, password2;
  16.        
  17.         cout << "Enter a username!" << endl;
  18.         getline(cin, username1);
  19.         cout << "Enter the username again!" << endl;
  20.  
  21.         getline(cin, username2);
  22.  
  23.        
  24.        
  25.         cout << "enter a password!" << endl;
  26.         getline(cin, password1);
  27.         cout << "Enter the password again!" << endl;
  28.         getline(cin, password2);
  29.        
  30.         if (password1 == "monaola" && username1 == "nikolaisen1998")
  31.         {
  32.             cout << "Welcome!" << endl;
  33.  
  34.         }
  35.         else if (password2 == "monaolaa" && username2 == "nikko415" )
  36.         {
  37.             cout << " the password is correct!" << endl;
  38.         }
  39.         else
  40.         {
  41.  
  42.             cout << "The password or the username is inccorect!" << endl;
  43.             cout << "You may try again in 30 seconds." << endl;
  44.                
  45.                 return _tmain();
  46.  
  47.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement