0% found this document useful (0 votes)
2 views

Assignment7.Cpp

assignments
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Assignment7.Cpp

assignments
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

File: /home/gescoe/SE-B(52)/assignment7.

cpp Page 1 of 1

//kartik Sunil Somvanshi


//SE B-52

#include<iostream>
#include<graphics.h>
#include<math.h>

using namespace std;

int main()
{
int gd=DETECT,gm;
int i,j;

initgraph(&gd,&gm,NULL);
for(i=0;i<500;i++)
{

line(20,380,580,380); //platform
if(i%2==0)
{
line(25+i,380,35+i,340); //left leg
line(45+i,380,35+i,340); //right leg
line(35+i,310,25+i,330); //left hand
delay(20);
}
else
{
line(35+i,380,35+i,340); //left leg
line(25+i,310,40+i,330); //left hand
delay(20);
}
line(35+i,340,35+i,310); //body
circle(35+i,300,10); //head
line(35+i,310,50+i,330); //hand
line(50+i,330,50+i,280); //umbrella stick
line(15+i,280,85+i,280); //umbrella right

arc(50+i,280,180,360,35); //umbrella body


arc(55+i,330,360,180,5); //umbrella handle
delay(200);

cleardevice();
}

getch();
return 0;
}

You might also like