RyukiChan

main

May 26th, 2020
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 3.28 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <ctime>
  4. #include <conio.h>
  5.  
  6. using namespace std;
  7.  
  8. void ulang() {
  9.     cout << "-----------------------------------\n";
  10. }
  11.  
  12.  
  13. int main(int argc, char const *argv[])
  14. {
  15.     string uss, pass;
  16.  
  17.     login:
  18.     cout << "masukan username : "; cin >> uss;
  19.     cout << "masukan password : "; cin >> pass;
  20.        
  21.     if(uss == "admin" && pass == "admin") {
  22.         system("cls");
  23.         goto load;
  24.     }
  25.     else {return 0;}  
  26.  
  27.     load:
  28.     for(int indeks = 0; indeks <= 100; indeks++) {
  29.         cout << "loading..." << indeks  << " %";
  30.         cout << endl;
  31.         system("cls");
  32.     }
  33.         system("color 0A");
  34.         pilih:
  35.         time_t now = time(0);
  36.         char* dt = ctime(&now);
  37.         cout << "Time now : " << dt;
  38.    
  39.         // pilihan menu
  40.         int pil;
  41.        
  42.         cout << "\nMau gak jadian sama w ?\n";
  43.              ulang();
  44.         cout << "[1] untuk \"iya\"\n"
  45.              << "[2] untuk \"tidak\"\n";
  46.              ulang();
  47.         cout << "Masukan pilihan Acaa : ";
  48.              cin >> pil;
  49.              system("cls");
  50.              
  51.     // penentuan pilihan
  52.     if (pil == 1) {
  53.             system("color 0A");
  54.             int i,j;
  55.          
  56.                  for(i=1;i<=22;i++){
  57.                  for(j=1;j<=60;j++){
  58.                  if(i==1) if(((j>=14)&&(j<=23))||((j>=39)&&(j<=48))) cout<<"*"; else cout<<" ";
  59.                  else if(i==2) if(((j>=11)&&(j<=26))||((j>=36)&&(j<=51))) cout<<"*"; else cout<<" ";
  60.                  else if(i==3) if(((j>=9)&&(j<=28))||((j>=34)&&(j<=53))) cout<<"*"; else cout<<" ";
  61.                  else if(i==4) if(((j>=7)&&(j<=30))||((j>=32)&&(j<=55))) cout<<"*"; else cout<<" ";
  62.                  else if((i>=5)&&(i<=8)) if((j>=5)&&(j<=57)) cout<<"*"; else cout<<" ";
  63.                  else if(i==9)  if((j>=7)&&(j<=55))  cout<<"*"; else cout<<" ";
  64.                  else if(i==10) if((j>=9)&&(j<=53))  cout<<"*"; else cout<<" ";
  65.                  else if(i==11) if((j>=11)&&(j<=51)) cout<<"*"; else cout<<" ";
  66.                  else if(i==12) if((j>=13)&&(j<=49)) cout<<"*"; else cout<<" ";
  67.                  else if(i==13) if((j>=15)&&(j<=47)) cout<<"*"; else cout<<" ";
  68.                  else if(i==14) if((j>=17)&&(j<=45)) cout<<"*"; else cout<<" ";
  69.                  else if(i==15) if((j>=19)&&(j<=43)) cout<<"*"; else cout<<" ";
  70.                  else if(i==16) if((j>=21)&&(j<=41)) cout<<"*"; else cout<<" ";
  71.                  else if(i==17) if((j>=23)&&(j<=39)) cout<<"*"; else cout<<" ";
  72.                  else if(i==18) if((j>=25)&&(j<=37)) cout<<"*"; else cout<<" ";
  73.                  else if(i==19) if((j>=27)&&(j<=35)) cout<<"*"; else cout<<" ";
  74.                  else if(i==20) if((j>=29)&&(j<=33)) cout<<"*"; else cout<<" ";
  75.                  else if(i==21) if((j>=30)&&(j<=32)) cout<<"*"; else cout<<" ";
  76.                  else if(i==22) if(j==31) cout<<"*"; else cout<<" ";
  77.               }
  78.               cout<<"\n";
  79.            }
  80.            cout << "\nI LOVE YOU :D\n";
  81.            cout << "Thanks atas pilihan nya :)\n\n";
  82.            
  83.     }
  84.         else if (pil == 2) {
  85.             system("color 0A");
  86.             cout << "Thanks doi udah mau ngejawab hehe :)\n";
  87.             cout << "-------------------------------------\n";
  88.     }
  89.      char piL;
  90.            cout << "Tekan [y] untuk kembali ke pilihan\n"
  91.                 << "Tekan [t] untuk keluar program\n"
  92.                 << "[y/t]... ? "; cin >> piL;
  93.                
  94.                 if (piL == 'y') {
  95.                     system("cls");
  96.                     goto pilih;
  97.                 }if (pil == 't') {
  98.                     goto out;
  99.             }
  100.                 out:
  101.                     system("cls");
  102.                     cout << "Good bye doi :)\n";
  103.                    
  104.     cin.get();
  105. return 0;
  106. }
Add Comment
Please, Sign In to add comment