Skip to content Skip to sidebar Skip to footer

Program membuat from login





nah ini program yang ane coba buat,bagus kan.... heheheheeeee di tantang ame programmer PRO, akhir nya berhasil juga ane.... :D
berikut ini code nya check kidiot.hakhakhakhak..... :v :D :

    #include <iostream>
    #include <conio.h>
    using namespace std;

    int main() {
    int i;
    char ch;
    cout << "============================\n";
    cout << "WELCOME Form Login BY RIFERNA\n";
    cout << "============================\n";
        for (i=1; i<=3; i++) {
           string user = "";
           string pass = "";
           cout << "Username : "; cin >> user;
           cout << "Password : ";
                ch = _getch();
                while(ch != 13){//character 13 is enter
                pass.push_back(ch);
                cout << '*';
                ch = _getch();
                }

           if (user == "riferna" && pass == "12345") {
             cout << "\n\nAnda berhasil login. \n" << endl;
             return 0;
          } else {
             cout << "\n\nMaaf Username & Password anda masukan salah.\n\n";
          }
       }
       while (i <= 3);

       cout << "Anda telah 3x memasukan Username & Password yang salah.\n";
       cout << "Mohon maaf akun anda kami blokir untuk sementara. \n";
       cout << "Silahkan hubungi kami melalui toko buku terdekat anda :) :D, Terima Kasih..";
       getch();
    }

semoga bermanfaat, di coba di rumah yeeee, jangan lupa komment nya, kunjungi terus blog ane yah gan (y)

1 comment for "Program membuat from login"

Riferna 23 December 2015 at 21:24 Delete Comment
thank you broo