C Program for Drawing a Bus :
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
void main()
{
int gd,gm;
detectgraph(&gd,&gm);
initgraph(&gd,&gm,"C:\\TurboC3\\BGI");
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
void main()
{
int gd,gm;
detectgraph(&gd,&gm);
initgraph(&gd,&gm,"C:\\TurboC3\\BGI");
rectangle(230,170,280,300);
setfillstyle(SOLID_FILL,RED);
floodfill(231,171,WHITE);
rectangle(300,150,350,200);
setfillstyle(SOLID_FILL,CYAN);
floodfill(301,151,WHITE);
rectangle(355,150,405,200);
setfillstyle(SOLID_FILL,CYAN);
floodfill(356,151,WHITE);
rectangle(200,100,420,300);
setfillstyle(SOLID_FILL,BLUE);
floodfill(201,101,WHITE);
circle(250,325,24);
setfillstyle(SOLID_FILL,BROWN);
floodfill(250,325,WHITE);
circle(380,325,24);
setfillstyle(SOLID_FILL,BROWN);
floodfill(380,325,WHITE);
getch();
closegraph();
I |
No comments:
Post a Comment