• 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

  • Popular Posts
    Arti dan Makna Lambang Garuda Pancasila
    Apakah kalian semua tahu apa arti dari Lambang Garuda Pancasila? Tidak semua masyarakat bangsa Indonesia mengetahui arti-arti Lambang Gar...
  • English Letter Business 2
    This function and definition about inquiry letter, complaint letter, application letter, order letter and memo letter. 1. Inquiry Letters ...
  • Popular Posts
    Album Ingat Sholawat
    Album Religi Wali Band yang berjudul Ingat Sholawat. Berisi 5 Lagu. Di rilis pada tahun 2009. Aku Cinta Allah   Ya Allah   Mari Shol...
  • Rute Perjalanan Menggunakan Motor Kuningan-Bekasi
    Motor merupakan kendaraan yang paling banyak digunakan pemudik ketika pulang kampung atau pada saat hari-hari besar seperti Hari Raya Idul F...
  • Popular Posts
    Membuat Burung Twitter di Blogger
    Jaman sekarang rata-rata semua orang mempunyai akun Twitter. Memang saat ini Twitter menjadi favorit salah satu jejaring sosial yang di ga...
Budayakan Internet Sehat,Aman dan Nyaman