Hey guys, today I am going to show you how to generate simple circular pattern using c/c++ and graphics. Here's the screen shot of the out put. Here is the code. Enjoy coding... Note: If the program is generating error in c then please save the file with .cpp extension. /* Programmer : Ashok Kumar Shrestha (ak007) Program details : Genetrates circular pattern */ #include<graphics.h> #include<stdio.h> #include<conio.h> #include<dos.h> void main() //two moving balls { int gd = DETECT, gm; int r=20; int x=400,y=300,x1,y1,x2=x-200,y2=y-200, x3=x2+250,y3=y2+250; int dx,dy; int a=x-100,b=y-150,a1,b1,dx1=3,dy1=4; initgraph(&gd,&gm,"..\\BGI"); dx=dx1=5; dy=dy1=5; rect...
Comments
Post a Comment