rectangle function

rectangle function is used to draw a rectangle and square. Coordinates of left top and right bottom corner are required to draw the rectangle.  
रेक्टेंगल फंक्शन की सहायता से एक आयत एवं वर्ग तैयार किया जा सकता है इस हेतु यह लेफ्ट-टॉप एवं राईट-बॉटम बिन्दुओ के मान ग्रहण करता है। 
Syntax:-
void rectangle(int left, int top, int right, int bottom);

Program:-
#include<graphics.h>
#include<conio.h>
int main()
{
   int gd = DETECT, gm;
   initgraph(&gd, &gm, "C:\\TC\\BGI");
   rectangle(100,100,200,200);
   getch();
   closegraph();
   return 0;
}

Comments

Popular posts from this blog

C Language Topics in Hindi and English

C language IMP Questions for BSc/BA/BCom/BCA/BE/BTech/MSc/MCA (CS/IT) I year students