Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.61 KB | None | 0 0
  1. #include<iostream>
  2.  
  3. using namespace std;
  4.  
  5. void menu(){
  6.     cout << "Välkommen";
  7. }
  8.  
  9. int main(){
  10.     string username = "snabban93";
  11.     string password = "masterfister89";
  12.  
  13.     string input1, input2;
  14.     int counter = 0;
  15.  
  16.     while(counter > 4){
  17.         cout << "Enter password and username " << endl;
  18.         cout << "Username:";
  19.         cin >> input1;
  20.         cout << "Password:";
  21.         cin >> input2;
  22.    
  23.         if(username == input1 && input2 == password){
  24.             menu()
  25.             break;
  26.         }
  27.         else{
  28.             cout << "login is invalid"<< endl;
  29.         }
  30.         ++counter
  31.     }
  32.     cout << "Fuck off " endl;
  33.     return 0;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement