answersLogoWhite

0


Best Answer

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

11y ago
This answer is:
User Avatar

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
Related questions

How do people make minecraft mods?

They program them using code and Java.


Write a java code to draw a circle inside in an ellipse?

write a program draw circle and ellipse by using oval methods in java


Difference between a java complier and the Java JIT?

A java compiler takes Java source code and turns it into Java bytecode, which can then be run by the java virtual machine.Using JIT means that the java code will be compiled and executed at the time that you run the program, which will slow down the program because it has to compile the code at the same time that it runs.


Why cant someone hack a Java program if they know the Java programming language?

Knowing Java does not allow you to hack a Java program because the source code is not available to hackers. Also, a program interprets the bit-code before you see it, so even with a decompiler, hacking the program will not be possible.


In the first step of the Java hybrid compilation process Java program code is converted into an intermediate format called .?

Java byte code.


Why it is not possible to execute java program on machine which does not have JVM installed on it?

when a java program is compiled it is converted into a non executable code which is byte code, and this byte code can only be interpreted by JVM. so a java program can't be executed on a machine which doesn't have JVM installed on it.


What is a Javacode?

If someone talks about "Java code," then they're are most likely referring to the source code of a Java program.


Write a c program Fibonacci series using for loop in java?

Exactly what do you mean by 'C program in Java'


What has the author Joe Weber written?

Joe Weber has written: 'Using Java 1.2' -- subject(s): Java (Computer program language) 'Using Java 1.1' -- subject(s): Java (Computer program language)


How do you execute a Java program?

You can run a Java application from the command line using "java &lt;name of the class&gt;"


What translates a Java program into Bytecode?

The Java Runtime Environment (JRE) converts the byte code to machine language.


Program for finding the current workload of PC using java?

There is no way to do this in Java without using either JNI calls or executing an outside, platform-specific program.