1 / 3

DRAW ING OF V BLOCK.

Start. int driver, mode. rectangle(100,100,200,150) line(150,100,150,150) line(125,100,125,150) line(175,100,175,150). line(100,160,125,160) line(125,160,150,210) line(150,210,175,160) line(175,160,200,160) line(200,160,200235) line(200,235,100,235)

Télécharger la présentation

DRAW ING OF V BLOCK.

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Start int driver, mode rectangle(100,100,200,150) line(150,100,150,150) line(125,100,125,150) line(175,100,175,150) line(100,160,125,160) line(125,160,150,210) line(150,210,175,160) line(175,160,200,160) line(200,160,200235) line(200,235,100,235) line(100,235,100,160) DRAW ING OF V BLOCK. Output stop

  2. Start program Define data type Explanation draw a v-block using rectangle and line function Display v-block in output end of program

  3. Program: /*program to prepare a drawing of v-block*/ #include<conio.h> /*header file included*/ #include<graphics.h> /*graphics header file included*/ void main() /*execution of program starts here*/ { /*starting braces*/ int driver,mode; /*data type defined that must be integer type variable*/ detectgraph(&driver,&mode); /*driver and modes are set*/ initgraph(&driver,&mode,"\\BGI"); /*graphic mode is initialized*/ setpalette(0,23); setcolor(5); /*set object color*/ /*draw v-block*/ rectangle(100,100,200,150); line(150,100,150,150); line(125,100,125,150); line(175,100,175,150); setcolor(6); line(100,160,125,160); line(125,160,150,210); line(150,210,175,160); line(175,160,200,160); line(200,160,200,235); line(200,235,100,235); line(100,235,100,160); getch(); restorecrtmode(); }

More Related