Assalamu Alaikum, Wr.Wb. ketemu lagi dengan saya pada malam hari ini. O iya malam ini saya akan posting tentang membuat program Password dan loading di C++. Program ini juga merupakan Tugas kuliah saya di semester dua. Stelah beberapa hari pusing dan Alhamdulillah program ini selesai juga dan akan saya bagikan ke teman teman. dan ndak usah berlama lama silahkan lihat Coding di bawah ini:
(Kunjungi juga Program Sewa Mobil di C++)
Hasilnya:
(Kunjungi juga Program Sewa Mobil di C++)
#include <iostream>
using namespace std;
int main()
{
const string USERNAME = "huri";
const string PASSWORD = "12345";
string username, password;
awal:
system("cls");
cout << "=================================================" << endl;
cout << "Selamat Datang Silahkan Masukkan User & Pass Anda" << endl;
cout << "=================================================" << endl;
cout << "Enter Username : ";
cin >> username;
cout << "Enter Password : ";
cin >> password;
if(username == USERNAME && password == PASSWORD)
{
for (int i=0; i<100; i++) {
cout<<"Mohon Tunggu" << endl;
cout<<"loading..."<<i<<endl;
system ("cls");
}
cout<<"LOADING COMPLETE"<<endl;
cout << "=======================" << endl;
cout << "Anda Berhasil Login !!!" << endl;
cout << "=======================" << endl;
}
else
{
cout << "================================" << endl;
cout << "Username dan Password Anda Salah" << endl;
cout << "================================" << endl;
}
return 0;
}
using namespace std;
int main()
{
const string USERNAME = "huri";
const string PASSWORD = "12345";
string username, password;
awal:
system("cls");
cout << "=================================================" << endl;
cout << "Selamat Datang Silahkan Masukkan User & Pass Anda" << endl;
cout << "=================================================" << endl;
cout << "Enter Username : ";
cin >> username;
cout << "Enter Password : ";
cin >> password;
if(username == USERNAME && password == PASSWORD)
{
for (int i=0; i<100; i++) {
cout<<"Mohon Tunggu" << endl;
cout<<"loading..."<<i<<endl;
system ("cls");
}
cout<<"LOADING COMPLETE"<<endl;
cout << "=======================" << endl;
cout << "Anda Berhasil Login !!!" << endl;
cout << "=======================" << endl;
}
else
{
cout << "================================" << endl;
cout << "Username dan Password Anda Salah" << endl;
cout << "================================" << endl;
}
return 0;
}
Hasilnya:
Sekian dari saya mohon Like dan Sharenya ya!. OK.