#include<graphics.h>
main()
{
initwindow(800,600);
//crtanje tacke
putpixel(50,50,GREEN);
//linije
line(100,50,150,50);
//crtanje trougla
line(200,50,225,25);
line(225,25,250,50);
line(250,50,200,50);
//crtanje pravougaonika
rectangle(300,25,350,50);
circle(50,100,25);
//kuca
//zid
rectangle(150,150,300,250);
//krov
line(150,150,175,100);
line(300,150,275,100);
line(175,100,275,100);
//prozor
rectangle(175,175,200,200);
line(175,187,200,187);
line(187,175,187,200);
rectangle(250,175,275,200);
line(250,187,275,187);
line(262,175,262,200);
//vrata
line(210,175,240,175);
line(210,175,210,250);
line(240,175,240,250);
//odzak
line(250,85,260,85);
line(250,85,250,100);
line(260,85,260,100);
while(!kbhit());
closegraph();
}
main()
{
initwindow(800,600);
//crtanje tacke
putpixel(50,50,GREEN);
//linije
line(100,50,150,50);
//crtanje trougla
line(200,50,225,25);
line(225,25,250,50);
line(250,50,200,50);
//crtanje pravougaonika
rectangle(300,25,350,50);
circle(50,100,25);
//kuca
//zid
rectangle(150,150,300,250);
//krov
line(150,150,175,100);
line(300,150,275,100);
line(175,100,275,100);
//prozor
rectangle(175,175,200,200);
line(175,187,200,187);
line(187,175,187,200);
rectangle(250,175,275,200);
line(250,187,275,187);
line(262,175,262,200);
//vrata
line(210,175,240,175);
line(210,175,210,250);
line(240,175,240,250);
//odzak
line(250,85,260,85);
line(250,85,250,100);
line(260,85,260,100);
while(!kbhit());
closegraph();
}
No comments:
Post a Comment