Professional Documents
Culture Documents
Laundry Fix
Laundry Fix
#include <iostream>
#include <windows.h>
#include <conio.h>
#include <fstream>
#include <ctime>
using namespace std;
void waktu();
int pilihan[4];
char yt, ch;
string nm, nomor_hp;
int kategori, beli, jam, menit, detik, hari, bulan, tahun;
int i = 0;
int simpan[4];
int berat_total[4] = { 50,50,50,50 };
int wei[4];
string mesin[4] = { "Reguler ","Ekspress","Kilat ","Promo " };
string promo[4] = { "Paket Reguler Cuci 2 Hari ","Paket Ekspress Cuci 1
Hari","Paket Kilat Cuci 3 Jam ","Paket Cuci Promo " };
int harga[] = { 10000,15000,13000,9000 };
int bel[4];
int tot[4];
int cuan = 0;
int total_bayar, kembalian, berat = 0, total, total_semua = 0;
void orgdlm();
int main()
{
awal:
system("color F5");
system("cls");
//Judul Program
cout << endl;
cout << "
###################################################" << endl;
cout << " # ~~~~~~~~~~~~~
#" << endl;
cout << " #~~~~~~~~~~~~~~~~~ Laundry PUTRA
~~~~~~~~~~~~~~~~~#" << endl;
cout << " #
#" << endl;
cout << " #~~~~~~~~ bersih, rapih, wangi,
kinclong ~~~~~~~~~#" << endl;
cout << " #
#" << endl;
cout << " #~~~~~~~~~~~~~ ADNAN, WILLY, PUTRA
~~~~~~~~~~~~~~~#" << endl;
cout << " # ~~~~~~~~~~~~~~~~~~~
#" << endl;
cout << "
###################################################" << endl << endl;
//Data Customer
cout << " Data Customer
Laundry" << endl;
cout << "
----------------------------" << endl;
cout << " Nama Customer : "; cin
>> nm;
if (nm == "admin")
{
system("cls");
cout << endl;
cout << "
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#" << endl;
cout << " # Administrasi Laundry
PUTRA #" << endl;
cout << "
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#" << endl << endl;
string username, password;
login:
username = "";
password = "";
cout << " Masukkan username: ";
cin >> username;
cout << " Masukkan password: ";
ch = _getch();
while (ch != 13) { // 13 adalah kode ASCII untuk karakter Enter
password.push_back(ch); // Menambahkan karakter null pada akhir
password
cout << '*';
ch = _getch();
}
}
}
else
{
cout << endl;
cout << "
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" << endl;
cout << " ~~~~~ Username /
Password Salah! ~~~~~" << endl;
cout << "
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" << endl;
i = i + 1;
if (i < 4)
{
goto login;
}
else
{
cout << " ~~~~~~~Anda
Terblokir~~~~~~~";
cin.get();
cin.get();
goto awal;
}
}
}
void waktu()
{
time_t ttime = time(0);
tm* local_time = localtime(&ttime);
jam = local_time->tm_hour;
menit = local_time->tm_min;
detik = local_time->tm_sec;
hari = local_time->tm_mday;
bulan = 1 + local_time->tm_mon;
tahun = 1900 + local_time->tm_year;
}