View Single Post
  #1  
Old 01-03-2011, 02:59 PM
bonfire's Avatar
bonfire bonfire is offline
M.Arsalan Qureshi

 
Join Date: Oct 2008
Location: Garden Town, Multan Cantt
Posts: 616
Program / Discipline: BSTS
Class Roll Number: 09-31
bonfire has a reputation beyond reputebonfire has a reputation beyond reputebonfire has a reputation beyond reputebonfire has a reputation beyond reputebonfire has a reputation beyond reputebonfire has a reputation beyond reputebonfire has a reputation beyond reputebonfire has a reputation beyond reputebonfire has a reputation beyond reputebonfire has a reputation beyond reputebonfire has a reputation beyond repute
Default Program to draw circles

Program to draw circles


#include <iostream.h>
#include <conio.h>
#include <graphics.h>
#include <ctype.h>
#include <stdlib.h>
#include <stdio.h>

void main()
{
clrscr();
int gd=DETECT,gm,errorcode; //Requesting auto-detection.
//Initializing graphics and local variables.
initgraph(&gd,&gm,"d:\\bc3\\bgi"); //Path where graphics drivers are installed
//Reading result of initialization.
errorcode=graphresult();
//An error occured.
if (errorcode!=grOk)
{
cout << "Graphics error occured : \n" << grapherrormsg(errorcode) << endl;
cout << "Press any key to stop : ";
getch();
exit(1);
}
circle(200,200,50); //Drawing a circle having center(200,200) and radius(50).
getch();
circle(300,203,40); //Drawing a circle having center(300,203) and radius(40).
getch();
circle(500,303,80); //Drawing a circle having center(500,303) and radius(80).
getch();
closegraph();


}
This graphics program draws three circles on the screen.
Attached Files
File Type: docx Program to draw circles(www.bzupages.com).docx (11.8 KB, 182 views)
__________________

Reply With Quote