Stumble

Download Category:

stumble.zip - (367.55 KB)
[
stumble/Debug/
stumble/Debug/stumble.exe
stumble/Debug/stumble.ilk
stumble/Debug/stumble.pdb
stumble/Question.txt
stumble/Screenshot_1.png
stumble/stumble.sln
stumble/stumble.suo
stumble/stumble/
stumble/stumble/Debug/
stumble/stumble/Debug/cl.command.1.tlog
stumble/stumble/Debug/CL.read.1.tlog
stumble/stumble/Debug/CL.write.1.tlog
stumble/stumble/Debug/link.1740.read.1.tlog
stumble/stumble/Debug/link.1740.write.1.tlog
stumble/stumble/Debug/link.1740-cvtres.read.1.tlog
stumble/stumble/Debug/link.1740-cvtres.write.1.tlog
stumble/stumble/Debug/link.command.1.tlog
stumble/stumble/Debug/link.read.1.tlog
stumble/stumble/Debug/link.write.1.tlog
stumble/stumble/Debug/link-cvtres.read.1.tlog
stumble/stumble/Debug/link-cvtres.write.1.tlog
stumble/stumble/Debug/mt.command.1.tlog
stumble/stumble/Debug/mt.read.1.tlog
stumble/stumble/Debug/mt.write.1.tlog
stumble/stumble/Debug/rc.command.1.tlog
stumble/stumble/Debug/rc.read.1.tlog
stumble/stumble/Debug/rc.write.1.tlog
stumble/stumble/Debug/stumble.exe.embed.manifest
stumble/stumble/Debug/stumble.exe.embed.manifest.res
stumble/stumble/Debug/stumble.exe.intermediate.manifest
stumble/stumble/Debug/stumble.lastbuildstate
stumble/stumble/Debug/stumble.log
stumble/stumble/Debug/stumble.obj
stumble/stumble/Debug/stumble.write.1.tlog
stumble/stumble/Debug/stumble_manifest.rc
stumble/stumble/Debug/vc100.idb
stumble/stumble/Debug/vc100.pdb
stumble/stumble/stumble.cpp
stumble/stumble/stumble.vcxproj
stumble/stumble/stumble.vcxproj.filters
stumble/stumble/stumble.vcxproj.user
]

Simulate the walk of a drunkard in a square street grid. Assume a grid of 10 streets horizontally and 10 streets vertically. Simulate a drunken person moving starting at the center of the grid. Simulate for 100 times the person picking a direction (east, west, north and south), move one block in the chosen direction. After 100 simulation print the location as a horizontal (east/west) and vertical (north/south) from the center. Hint: declare two variables one to keep track of east/west movement and the other to track north/south. Add or subtract one from the corresponding variable depending on the moves.

Write a Review

Get a fresh solution of this question. Ask it now to our experts.
doubt

Ask Your Question

We have verified professionals who are ready to answer your question.

time

Save Time and Money

We choose experts who can quickly answer your question and that suit your budget.

download

Get Your Answer

Your satisfaction is 100% guaranteed. You can keep on asking questions until you get the answer you need.