Langsung ke konten utama

Program Membuat Love

Kali Ini Admin @feidodol akan membuat program Love yang sederhana... Ikuti yaaa teman teman...

#include <iostream>  
#include <stdlib.h>
#include <windows.h> 
using namespace std;


int main(){
system("cls");
int i,j;
system("color 11");
for(i=1;i<=22;i++){
         for(j=1;j<=60;j++){
         if(i==1) if(((j>=14)&&(j<=23))||((j>=39)&&(j<=48))) cout<<"*"; else cout<<" ";
         else if(i==2) if(((j>=11)&&(j<=26))||((j>=36)&&(j<=51))) cout<<"*"; else cout<<" ";
         else if(i==3) if(((j>=9)&&(j<=28))||((j>=34)&&(j<=53))) cout<<"*"; else cout<<" ";
         else if(i==4) if(((j>=7)&&(j<=30))||((j>=32)&&(j<=55))) cout<<"*"; else cout<<" ";
         else if((i>=5)&&(i<=8)) if((j>=5)&&(j<=57)) cout<<"*"; else cout<<" ";
         else if(i==9)  if((j>=7)&&(j<=55))  cout<<"*"; else cout<<" ";
         else if(i==10) if((j>=9)&&(j<=53))  cout<<"*"; else cout<<" ";
         else if(i==11) if((j>=11)&&(j<=51)) cout<<"*"; else cout<<" ";
         else if(i==12) if((j>=13)&&(j<=49)) cout<<"*"; else cout<<" ";
         else if(i==13) if((j>=15)&&(j<=47)) cout<<"*"; else cout<<" ";
         else if(i==14) if((j>=17)&&(j<=45)) cout<<"*"; else cout<<" ";
         else if(i==15) if((j>=19)&&(j<=43)) cout<<"*"; else cout<<" ";
         else if(i==16) if((j>=21)&&(j<=41)) cout<<"*"; else cout<<" ";
         else if(i==17) if((j>=23)&&(j<=39)) cout<<"*"; else cout<<" ";
         else if(i==18) if((j>=25)&&(j<=37)) cout<<"*"; else cout<<" ";
         else if(i==19) if((j>=27)&&(j<=35)) cout<<"*"; else cout<<" ";
         else if(i==20) if((j>=29)&&(j<=33)) cout<<"*"; else cout<<" ";
         else if(i==21) if((j>=30)&&(j<=32)) cout<<"*"; else cout<<" ";
         else if(i==22) if(j==31) cout<<"*"; else cout<<" ";
      }
      cout<<"\n";
   }
   return 0;
}

Dan inilah hasilnya...


Komentar

Postingan populer dari blog ini

Presentasi ROBOTIKA

Hello Guys Kali Ini Admin @feidodol akan menshare tentang Robotika. Tapi ini dalam bentuk Power Point yang Berbentuk JPG... Cekidooot....

Program Membuat Segitiga dengan Bintang

Hai Kawan-kawan, kali ini Admin @feidodol akan membuat Program Segitiga dengan menggunakan bintang... Ikuti Terus Yaak... #include <iostream> using namespace std; int main() { int n; cout << "n = "; cin >> n; for (int a = n; a >= 1; a--) { for (int b = 1; b <= a; b++) { cout << "*"; } cout << endl; } } Dan Hasilnya Akan Seperti ini....

Program Zodiak

Kali ini ali ini Admin @feidodol akan membuat program Menampilkan Zodiak, ikuti terus yaaa.... #include <iostream> #include <conio.h> #include <string.h> using namespace std; int main() { struct zodiak { char nama [11]; int tgl_awal; int bln_awal; int tgl_akhir; int bln_akhir; }; struct zodiak bintang1={"ARIES",21,3,19,4}; struct zodiak bintang2={"TAURUS",20,4,20,5}; struct zodiak bintang3={"GEMINI",21,5,20,6}; struct zodiak bintang4={"CANCER",21,6,20,7}; struct zodiak bintang5={"LEO",23,7,22,8}; struct zodiak bintang6={"VIRGO",23,8,22,9}; struct zodiak bintang7={"LIBRA",23,9,22,10}; struct zodiak bintang8={"SCORPIO",23,10,21,11}; struct zodiak bintang9={"SAGITARIUS",23,11,20,12}; struct zodiak bintang10={"CAPRICORN",22,12,19,1}; struct zodiak bintang11={"AQUARIUS",20,1,18,2}; struct zodiak bintang12={"PISCES",19,2,20,3}; char nm[20]; int tgl_lhr,...