Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <conio.h>
- #include <windows.h>
- #include <stdio.h>
- void gotoxy(int x, int y){
- COORD k = {x,y};
- SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), k);
- }
- using namespace std;
- char nama[30],alamat[60],noHP[60],PilKategori,kategoriCucian[30];
- int biaya,jumlah,totaljumlah;
- char pilih,pilihan;
- int x,y;
- string un[50],passwd[50],konf[50],user,pass;
- int main(){
- x=2;
- un[1] = "admin";
- passwd[1] = "admin";
- atas:
- system("cls");
- gotoxy(42,2);cout << "SELAMAT DATANG DI APLIKASI LAUNDRYKU";
- gotoxy(21,3);cout << "SILAHKAN LOGIN KE AKUN ANDA";
- cout << endl;
- gotoxy(21,4);cout << "Apakah Anda Belum Memiliki Akun? Silahkan Membuat akun baru(y/t) : ";
- cin>>pilih;
- gotoxy(21,5);cout << "LOADING...";
- Sleep (2000);
- cout << ".....";
- if (pilih == 'y'){
- yo:
- system("cls");
- gotoxy(45,2);cout << " MENU PENDAFTARAN AKUN LAUNDRYKU ";
- gotoxy(21,3);cout << "Masukkan username: ";
- cin >> un[x];
- gotoxy(21,4);cout << "Masukkan password anda: ";
- cin >> passwd[x];
- gotoxy(21,5);cout << "Masukkan lagi password anda: ";
- cin >> konf[x];
- gotoxy(21,6);cout << "LOADING...";
- Sleep (2000);
- cout << ".....";
- system("cls");
- if (konf[x] == passwd[x]){
- gotoxy(35,4);cout << "Selamat Anda berhasil registrasi akun di laundryku";
- gotoxy(38,5);cout << "Silahkan Tekan enter untuk menuju Menu Login";
- getch();
- goto ho;
- }
- else{
- gotoxy(42,4);cout << "Password yang anda masukkan berbeda";
- cout << endl;
- gotoxy(41,5);cout << "Masukkan ulang username dan password anda";
- getch();
- goto yo;
- }
- x++;
- }
- else{
- ho:
- int su=3;
- hi:
- system("cls");
- gotoxy(46,2);cout << "LOGIN KE APLIKASI LAUNDRYKU";
- cout << endl;
- gotoxy(21,3);cout << "Masukkan username : ";
- cin >> user;
- gotoxy(21,4);cout << "Masukkan password anda: ";
- cin >>pass;
- for (y=1; y<=x; y++){
- if (user == un[y]){
- if (pass == passwd[y]){
- gotoxy(21,5);cout << "LOADING...";
- Sleep (2000);
- cout << ".....";
- system("cls");
- cout << endl;
- gotoxy(48,6);cout << "Anda login sebagai "<<user;
- gotoxy(39,7);cout << "lanjutkan masuk ke menu aplikasi Laundryku";
- getch();
- system("cls");
- gotoxy(34,2);cout<<"====================================================";
- gotoxy(34,3);cout<<"\t\t Program Laundry Pakaian";
- gotoxy(34,4);cout<<"====================================================";
- gotoxy(34,6);cout<<"----------------------------------------------------";
- gotoxy(34,7);cout<<"\t\t Input Data Pesanan";
- gotoxy(34,8);cout<<"----------------------------------------------------";
- gotoxy(34,9);cout<<"Nama Pelanggan : ";
- cin>>nama;
- gotoxy(34,10);cout<<"Alamat : ";
- cin>>alamat;
- gotoxy(34,11);cout<<"No Handphone : ";
- cin>>noHP;
- gotoxy(34,12);cout<<"----------------------------------------------------";
- gotoxy(34,13);cout<<"\t\t Kategori Cucian";
- gotoxy(34,14);cout<<"----------------------------------------------------";
- gotoxy(34,15);cout<<"1. Reguler(3 hari)";
- gotoxy(34,16);cout<<"2. Ekspress (2 hari)";
- gotoxy(34,17);cout<<"3. Kilat (1 hari)";
- gotoxy(34,18);cout<<"----------------------------------------------------";
- gotoxy(34,19);cout<<"Input No Kategori [1-3] : ";
- cin>>PilKategori;
- switch(PilKategori)
- {
- case '1' :
- strcpy(kategoriCucian,"Cuci Reguler 3 Hari ");
- biaya=3000;
- break;
- case '2' :
- strcpy(kategoriCucian,"Cuci Ekspress 2 Hari ");
- biaya=6000;
- break;
- case '3' :
- strcpy(kategoriCucian,"Cuci Kilat 1 Hari ");
- biaya=9000;
- break;
- default:
- strcpy(kategoriCucian, "tanda salah kode");
- break;
- }
- gotoxy(34,20);cout<<"jumlah Cucian (/5 pcs) : ";
- cin>>jumlah;
- system ("cls");
- gotoxy(28,2);cout<<"------------------------------------------------------------------";
- gotoxy(50,3);cout<<"Resi Pesanan Laundry"<<endl;
- gotoxy(28,4);cout<<"------------------------------------------------------------------";
- gotoxy(28,5);cout<<"Nama Pelanggan : "<<nama;
- gotoxy(28,6);cout<<"Alamat : "<<alamat;
- gotoxy(28,7);cout<<"No Handphone : "<<noHP;
- gotoxy(28,8);cout<<kategoriCucian<<" : Rp. "<<biaya;
- totaljumlah=biaya*jumlah;
- gotoxy(28,9);cout<<"Total Biaya : Rp. "<<totaljumlah;
- gotoxy(28,10);cout<<"-----------------------------------------------------------------";
- gotoxy(28,12);cout<<"-----------------------------------------------------------------";
- gotoxy(32,13);cout<<"Terima kasih telah Memesan Jasa Pencucian di laundry kami";
- gotoxy(28,14);cout<<"Pakaian anda akan kami ambil dan akan di antar jika sudah selesai";
- gotoxy(30,15);cout<<"Silahkan Screenshoot/simpan resi ini Sampai pembayaran Selesai";
- cout<<""<<endl;
- getch();
- system("cls");
- gotoxy(36,4);cout<<"Apakah anda ingin Memesan jasa kami lagi? (y/t)";
- cin>>pilihan;
- if (pilihan=='y'){
- goto hi;
- }
- else if(pilihan=='t'){
- exit(0);
- getch();
- }
- else {
- exit(0);
- }
- }
- else{
- if (su==1){
- system("cls");
- cout << "ANDA TERLALU BANYAK MENCOBA MASUK"<<endl;
- cout << "COBA BEBERAPA SAAT LAGI!!";
- exit (0);
- }
- su=su-1;
- system("cls");
- cout << "kata sandi salah, kesempatan anda sisa "<<su<<" kali";
- getch();
- goto hi;
- }
- }
- }
- system("cls");
- cout << "username yang anda masukkan salah";
- getch();
- goto ho;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement