Drawing concentric circles Turbo C

December 2016




Issue


I've drawn a pair of concentric circle. Now i want to give random movement to the inner circle. Please tell me how I will do it in turbo c.

Solution


Used the command line;
#include<graphics.h>  
#include<stdio.h>  
#include<conio.h>  

main()  
{  
int gd=DETECT,gm,col=0;  
initgraph(&gd,&gm," ");  
while(!kbhit())  
{  
setcolor(15);  
circle(col,100,50);  
delay(1000);  

col++;  
if(col>=600)  
col=0;  
cleardevice();  
}  
}  

Note


Solved by madhu

Related :

This document entitled « Drawing concentric circles Turbo C » from CCM (ccm.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.