-->
Friday, June 24, 2022
Design a home with color | C Graphics Program
FindError
Home
Catagories
C Programs
C Graphics
Python Programs
About
Contact
Home
About
Contact
C Graphics Programs
Design a Home
Design a Home with color
Design a Tree
Design a Car
Draw a Truck
Draw Rabindranath Tagore
Mom and Baby Elephant
Design a home with color using C Graphics
Q. Write a program to design a home with color using C graphics
Output
Source Code
// WAP to design a home with color using C graphics // Code for TurboC++ compiler #include
#include
#include
void home() { int x,y,arr[]={350,200,300,150,250,200,280,200,315,165}; //ground line(0,230,800,230); //roof drawpoly(5,arr); line(300,150,400,150); line(350,200,450,200); line(400,150,450,200); //color setfillstyle(SOLID_FILL,6); floodfill(400,160,WHITE); setfillstyle(SOLID_FILL,4); floodfill(280,175,WHITE); //body line(280,200,280,230); line(350,200,350,230); line(430,200,430,230); //color setfillstyle(SOLID_FILL,8); floodfill(300,220,WHITE); setfillstyle(SOLID_FILL,7); floodfill(370,220,WHITE); //windows and doors circle(310,200,12); arc(315,200,100,260,12); rectangle(380,210,400,230); //color setfillstyle(SOLID_FILL,0); floodfill(310,200,WHITE); floodfill(390,220,WHITE); } void main() { int gd=DETECT, gm; initgraph(&gd, &gm, "c:\\Turboc3\\BGI"); home(); getch(); closegraph(); }
Copy Code
C Graphics Programs
Design a Home
Design a Home with color
Design a Tree
Design a Car
Draw a Truck
Draw Rabindranath Tagore
Mom and Baby Elephant
No comments:
Post a Comment
Newer Post
Older Post
Home
Contact Form
Name
Email
*
Message
*
No comments:
Post a Comment