C++ program to draw concentric circles from a fixed point
kw.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
kodingwindow@kw:~$ g++ kw.cpp -lgraph
kodingwindow@kw:~$ ./a.out
Advertisement