#include<conio.h>
#include<iostream.h>
#include<graphics.h>
class DIEM
{
private:
int x,y,m;
public:
void nhap();
void hien();
void an()
{
putpixel(x,y,getbkcolor());
}
};
void DIEM::nhap()
{
cout<<”\n Nhap hoanh
do va tung
do: “
;cin>>x
>>y
; cout<<”\n nhap ma mau cua diem
: “
;cin>>m
; }
void DIEM::hien()
{
int mau_ht;
mau_ht=getcolor();
putpixel(x,y,m);
setcolor(mau_ht);
}
void kd_do_hoa()
{
int mh,mode;
mh=mode=0;
initgraph(&mh,&mode,””);
}
void main()
{
DIEM d1,d2,d3;
d1.nhap();d2.nhap();d3.nhap();
kd_do_hoa();
setbkcolor(BLACK);d1.hien();d2.hien();d3.hien();
getch();
d1.an();
d2.an() ;d3.an();
getch();
closegraph();
}