Tutorial Membuat Tv Dengan Dev C++
Langkah - Langkah Membuatnya:
1. Buka Dev C++ > New Project
2. Project Options > Pilih Compiler > Base Compiler Set: TDM-GCC 4.9.2 32-bit Release
3. Pilih Parameter > Masukkan Linker Berikut:
-lbgi
-lgdi32
-luser32
Didalam Kolom Linker > Klik Ok
4. Silahkan Copy-Paste Script Program Dibawah Ini Ke Project Baru Anda:
6. Sekian Dan Terima Kasih
#include <graphics.h>
#include
using namespace std;
main(){
//Pembuatan TV Jaman Old
initwindow(600,600);
//casing tv
setlinestyle(0,0,5);
rectangle(100,150,500,400);
setlinestyle(0,0,0);
arc(150,200,90,180,50);
arc(150,350,180,270,50);
arc(300,200,0,90,50);
arc(300,350,270,360,50);
line(350,200,350,350);
//layar TV
setlinestyle(0,0,3);
rectangle(120,170,330,380);
arc(130,180,90,180,10);
arc(130,370,180,270,10);
arc(320,370,270,360,10);
arc(320,180,0,90,10);
//tombol
setlinestyle(0,0,0);
int tombol[]={380,375,380,395,400,395};
drawpoly(3,tombol);
int tombolx[]={380,375,405,375,405,395,425,395};
drawpoly(4,tombolx);
int tomboly[]={405,375,430,375,430,395,450,395};
drawpoly(4,tomboly);
int tombola[]={430,375,455,375,455,395,475,395};
drawpoly(4,tombola);
int tombolb[]={455,375,480,375,480,395};
drawpoly(3,tombolb);
//loudspeaker
setlinestyle(0,0,3);
rectangle(360,200,490,330);
arc(395,235,90,180,35);
arc(395,295,180,270,35);
arc(455,295,270,360,35);
arc(455,235,0,90,35);
setlinestyle(DOTTED_LINE,0,0);
int louds;
for(louds=380;louds<=470;louds+=5){
line(louds,210,louds,320);
}
line(375,220,375,310);
line(370,230,370,300);
line(475,220,475,310);
line(480,230,480,300);
//Antena
setlinestyle(0,0,5);
int dudukan_ant[]={395,150,405,130,445,130,455,150};
drawpoly(4,dudukan_ant);
setlinestyle(0,0,2);
int ant[]={365,50,425,130,485,50};
drawpoly(3,ant);
setlinestyle(0,0,10);
line(365,50,365,50);
line(485,50,485,50);
getch();
closegraph();
return 0;
}
5. Kemudian Save Dan Tekan F116. Sekian Dan Terima Kasih
Related Posts
Subscribe Our Newsletter
Belum ada Komentar untuk "Tutorial Membuat Tv Dengan Dev C++"
Posting Komentar