answersLogoWhite

0

Source code:

001#include<graphics.h>

002using namespace std;

003

004int main()

005{

006 int gd=DETECT, gm;

007 initgraph(&gd, &gm,NULL);

008 int i,walk=0;

009

010 setcolor(BROWN);

011 bar3d(10,280,getmaxx()-50,320,10,50);

012 outtextxy(200,300,"www.2k8618.blogspot.com");

013

014 setcolor(WHITE);

015 circle(70,140,30);

016 circle(60,130,3);

017 circle(80,130,3);

018 line(70,135,70,145);

019 //line(65,155,75,155);

020 arc(70,140,60,120,15);

021

022 line(70,170,70,220);

023 line(70,170,50,220);

024 line(70,170,90,220);

025 line(70,220,55,270);

026 line(70,220,85,270);

027

028 setcolor(9);

029 fillellipse(150,100,60,40);

030 outtextxy(110,90,"hi," );

031 outtextxy(110,100,"go for a walk?");

032

033 delay(5000);

034

035 for(i=0;i<30;i++)

036 {

037

038 /*

039 cleardevice();

040 walk+=5;

041 bar3d(10,280,getmaxx()-50,320,10,50);

042 circle(70+walk,140,30);

043 line(70+walk,170,70+walk,220);

044 line(70+walk,170,40+walk,220);

045 line(70+walk,170,100+walk,220);

046 line(70+walk,220,30+walk,270);

047 line(70+walk,220,110+walk,270);

048 delay(500);*/

049

050 walk+=5;

051

052 cleardevice();

053

054 setcolor(BROWN);

055 bar3d(10,280,getmaxx()-50,320,10,50);

056 outtextxy(200,300,"www.2k8618.blogspot.com");

057

058 setcolor(WHITE);

059 circle(70+walk,140,30);

060 line(70+walk,170,70+walk,220);

061 line(70+walk,170,50+walk,220);

062 line(70+walk,170,90+walk,220);

063 line(70+walk,220,55+walk,270);

064 line(70+walk,220,85+walk,270);

065

066 delay(250);

067

068 walk+=5;

069

070 cleardevice();

071

072 circle(70+walk,140,30);

073 line(70+walk,170,70+walk,270);

074

075 setcolor(BROWN);

076 bar3d(10,280,getmaxx()-50,320,10,50);

077 outtextxy(200,300,"www.2k8618.blogspot.com");

078

079 delay(250);

080

081 walk+=5;

082

083 cleardevice();

084

085 bar3d(10,280,getmaxx()-50,320,10,50);

086 outtextxy(200,300,"www.2k8618.blogspot.com");

087

088 setcolor(WHITE);

089 circle(70+walk,140,30);

090 line(70+walk,170,70+walk,220);

091 line(70+walk,170,60+walk,220);

092 line(70+walk,170,80+walk,220);

093 line(70+walk,220,55+walk,270);

094 line(70+walk,220,85+walk,270);

095

096 delay(250);

097

098 }

099

100 circle(60+walk,130,3);

101 circle(80+walk,130,3);

102 line(70+walk,135,70+walk,145);

103 line(65+walk,155,75+walk,155);

104 //arc(70,140,60,120,15);

105

106 setcolor(8);

107 fillellipse(walk-10,100,60,40);

108 outtextxy(walk-30,100,"lonely...");

109

110 delay(2500);

111

112 getch();

113 closegraph();

114 return 0;

115}

User Avatar

Wiki User

12y ago

Still curious? Ask our experts.

Chat with our AI personalities

TaigaTaiga
Every great hero faces trials, and you—yes, YOU—are no exception!
Chat with Taiga
RafaRafa
There's no fun in playing it safe. Why not try something a little unhinged?
Chat with Rafa
JordanJordan
Looking for a career mentor? I've seen my fair share of shake-ups.
Chat with Jordan

Add your answer:

Earn +20 pts
Q: How to program a man walking using java code?
Write your answer...
Submit
Still have questions?
magnify glass
imp