Write a program to make three concentric circles using graphic Window
Answers
Answered by
1
Compile this code in TurboC:
#include<stdio.h>
#include<graphics.h>
#include<conio.h>
int main()
{
int g = DETECT,graph;
int a,b;
initgraph(&g, &graph, "C:\\TC\\BGI");
a = getmaxx()/2;
b = getmaxy()/2;
setcolor(GREEN);
circle(a, b, 30);
setcolor(BLUE);
circle(a, b, 50);
setcolor(WHITE);
circle(a, b, 70);
getch();
closegraph();
return 0;
}
#include<stdio.h>
#include<graphics.h>
#include<conio.h>
int main()
{
int g = DETECT,graph;
int a,b;
initgraph(&g, &graph, "C:\\TC\\BGI");
a = getmaxx()/2;
b = getmaxy()/2;
setcolor(GREEN);
circle(a, b, 30);
setcolor(BLUE);
circle(a, b, 50);
setcolor(WHITE);
circle(a, b, 70);
getch();
closegraph();
return 0;
}
Similar questions