-->
Monday, June 27, 2022
Design a Car | 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 Car using C Graphics
Q. Write a program to design a Car using C graphics
Output
Source Code
// WAP to design a car using C graphics // Code for TurboC++ compiler #include
#include
void car(){ int body[]={144,268, 141,259, 132,252, 132,238, 139,226, 144,220, 151,216, 161,213, 178,210, 222,205, 272,172, 284,168, 357,168, 378,175, 422,205, 440,206, 445,211, 451,223, 453,234, 453,254, 447,260, 443,268}; //body (lower to upper) line(144,268,163,268); ellipse(190,268,0,180,26,33); line(217,268,359,268); ellipse(386,268,0,180,26,33); line(413,268,444,268); drawpoly(22,body); //wheels circle(190,261,21); circle(190,261,12); circle(386,261,21); circle(386,261,12); //windows line(236,205,313,205); line(313,205,313,172); line(313,172,280,174); line(280,174,236,205); line(322,205,400,205); line(400,205,354,174); line(354,174,322,172); line(322,172,322,205); //ground line(0,282,639,282); } void main(){ int gd=DETECT, gm; initgraph(&gd,&gm,"c:\\Turboc3\\BGI"); car(); 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