19-12-2012, 06:36 PM
ANIMATAION
ANIMATAION.docx (Size: 12.55 KB / Downloads: 22)
Algorithm:
1. Start the program.
2. Declare the variables using structure.
3. To initiate the graph variable.
4. Using for loop condition to give the condition for line drawing function.
5. To give the condition for circle drawing function.
6. Then, to give the condition for line drawing function
7. To give the condition for rectangle drawing function
8. Delay the timing sequence.
9. Close the graph.
10. End the program.
PROGRAM:
#include<stdio.h>
#include<conio.h>
#include<dos.h>
#include<graphics.h>
void main()
{
int i,gd=DETECT,gm=0;
initgraph(&gd,&gm,"c:\turboc3");
for(i=0;i<600;i=i+2)
{
line(50+i,300,100+i,300);
line(100+i,300,150+i,250);
line(150+i,250,300+i,250);