• Home
  • Contact
Drossophyla
  • Home
  • Kesehatan
  • Pendidikan
  • Olahraga
  • Lirik Lagu
Home » Not Label » Love Patah menggunakan C++

Love Patah menggunakan C++

Beberapa hari yang lalu saya mendapatkan codingan program C++ dengan outputnya LOV. Setelah saya amati gambar dan codingannya tiba-tiba saya ingin membuat  output LOVE tetapi tengah-tengahnya terbelah. Akhirnya saya berhasil membuatnya, dan inilah codingannya :
#include <conio.h>
#include <iostream.h>
main(){
clrscr();
int i,j;
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<=29))||((j>=33)&&(j<=55))) cout<<"*"; else cout<<" ";
else if(i==5) if(((j>=6)&&(j<=29))||((j>=33)&&(j<=57))) cout<<"*"; else cout<<" ";
else if(i==6) if(((j>=6)&&(j<=29))||((j>=33)&&(j<=57))) cout<<"*"; else cout<<" ";
else if(i==7) if(((j>=6)&&(j<=29))||((j>=33)&&(j<=57))) cout<<"*"; else cout<<" ";
else if(i==8) if(((j>=6)&&(j<=29))||((j>=33)&&(j<=57))) cout<<"*"; else cout<<" ";
else if(i==9) if(((j>=7)&&(j<=29))||((j>=33)&&(j<=55))) cout<<"*"; else cout<<" ";
else if(i==10) if(((j>=9)&&(j<=29))||((j>=33)&&(j<=53))) cout<<"*"; else cout<<" ";
else if(i==11) if(((j>=11)&&(j<=29))||((j>=33)&&(j<=52))) cout<<"*"; else cout<<" ";
else if(i==12) if(((j>=13)&&(j<=29))||((j>=33)&&(j<=49))) cout<<"*"; else cout<<" ";
else if(i==13) if(((j>=15)&&(j<=29))||((j>=33)&&(j<=47))) cout<<"*"; else cout<<" ";
else if(i==14) if(((j>=17)&&(j<=29))||((j>=33)&&(j<=45))) cout<<"*"; else cout<<" ";
else if(i==15) if(((j>=19)&&(j<=29))||((j>=33)&&(j<=43))) cout<<"*"; else cout<<" ";
else if(i==16) if(((j>=21)&&(j<=29))||((j>=33)&&(j<=41))) cout<<"*"; else cout<<" ";
else if(i==17) if(((j>=23)&&(j<=29))||((j>=33)&&(j<=39))) cout<<"*"; else cout<<" ";
else if(i==18) if(((j>=25)&&(j<=29))||((j>=33)&&(j<=37))) cout<<"*"; else cout<<" ";
else if(i==19) if(((j>=27)&&(j<=29))||((j>=33)&&(j<=35))) cout<<"*"; else cout<<" ";
else if(i==20) if(((j>=28)&&(j<=29))||((j>=33)&&(j<=34))) cout<<"*"; else cout<<" ";
else if(i==21) if(((j>=29)&&(j<=29))||((j>=33)&&(j<=33))) cout<<"*"; else cout<<" ";
}
cout<<"\n";
}
getch();

}

Inilah outputnya :














Semoga bermanfaat, dan selamat mencoba dan berkreasi...
Agus Ramdani
Add Comment
Tuesday, April 17, 2012
Tweet
Love Patah menggunakan C++ Drossophyla
Published: 2012-04-17T22:25:00+07:00
Title:Love Patah menggunakan C++
Rating: 5 On 22 reviews

Related Articles

No comments:

Post a Comment

Newer Older Home
Universitas Gunadarma

Popular Post

  • Jawaban Latihan " A Guide To The Project Management Body Of Knowledge - Intoduction"
    Jawaban Latihan " A Guide To The Project Management Body Of Knowledge - Intoduction" Organis asi melakukan pekerjaan. Peke...
  • Perbedaan antara Past Tense dengan Present Perfect Tense
    PAST TENSE Inti dari Past Tense adalah untuk menyatakan peristiwa yang telah “Lampau”. Semua itu sudah “Past. Berikut adalah rumus ya...
Budayakan Internet Sehat,Aman dan Nyaman