Drawing concentric circles Turbo C

March 2017




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


Published by aakai1056.
This document, titled "Drawing concentric circles Turbo C," is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (ccm.net).