C++ program to draw concentric circles from a fixed point
gd.cpp
#include <graphics.h> int main() { int gd = 0, gm = 9, i; initgraph(&gd, &gm, NULL); for (i = 10; i <= 150; i = i + 10) { setcolor(15); circle(120 + i, 200, i); delay(200); } delay(5000); return 0; }
Output
godarda@gd:~$ g++ gd.cpp -lgraph
godarda@gd:~$ ./a.out![]()
Comments and Reactions
What Next?
C++ program to draw concentric color-filled circles
C++ program to draw concentric color-filled circles from a fixed point
C++ program to draw a quarter color-filled circle using the pieslice function
Advertisement