Return to Snippet

Revision: 25632
at April 4, 2010 01:50 by k9flow


Initial Code
#include <iostream>
#include <string>
using namespace std;

int main() {
    string username;                // Created By k9flow
    string password;
    string user;
    string pass;
    pass = "myg0t";                 // Declaring 
    user = "myg0t";                 // Declaring
    int code;
    code = rand();
    system("cls");
    cout << "Username: ";
    cin >> username;
    if (username == user) {
                 system("cls");
                 cout << "Password: ";
                 cin >> password;
                 if (password == pass) {        // Checks the recorded string "password"
                              system("cls");
                              cout << "You Have Logged In!\n";
                              cout << "\n";
                              cout << "The Code Is " << code << " !\n"; // Displays Code!
                              cout << "\n";
                              system("PAUSE");
                              return 0;
                              }
                 else {                         // If the string is wrong...
                      system("cls");
                      cout << "Wrong Password~!~!\n";
                      system("PAUSE");
                      main();
                      }
                      return 0;
}
}

Initial URL


Initial Description
Well Here...

Newbs Only!

Initial Title
Account / Password

Initial Tags
user

Initial Language
C++