problem named walk

R

rajat

there is a person who is standing in the middle of a square of size
n*n.he can walk
sideways or cross,i.e. from a block (i,j ), he can go to
(i+1,j+1),(i-1,j-1),(i+1,j),(i-1,j)
(i,j+1),(i,j-1),(i+1,j-1),(i-1,j+1).He cannot go if he reaches the end
of the block.
Show a path by which he can cover the whole square.
 
D

Default User

rajat said:
there is a person who is standing in the middle of a square of size
n*n.he can walk
sideways or cross,i.e. from a block (i,j ), he can go to
(i+1,j+1),(i-1,j-1),(i+1,j),(i-1,j)
(i,j+1),(i,j-1),(i+1,j-1),(i-1,j+1).He cannot go if he reaches the end
of the block.
Show a path by which he can cover the whole square.

No. The reason I won't? Because I'm not in school and don't have to do
homework. You apparently are. Give it your best shot, and post the
trial here. We will help you with the code.

If you don't even have an algorithm yet, you'll need to post elsewhere,
comp.programming perhaps.



Brian
 
F

Flash Gordon

rajat said:
there is a person who is standing in the middle of a square of size
n*n.he can walk
sideways or cross,i.e. from a block (i,j ), he can go to
(i+1,j+1),(i-1,j-1),(i+1,j),(i-1,j)
(i,j+1),(i,j-1),(i+1,j-1),(i-1,j+1).He cannot go if he reaches the end
of the block.
Show a path by which he can cover the whole square.

Right, I've drawn a picture. Now, do you have a C question?

If you want me to do your homework for you then slip a brown envelope
with 200UKP in used fivers under my door and your instructors email
address. It's 500UKP if you want me to send the answer to you instead of
your instructor.

Alternatively, try to do your homework, read the URL in my sig, and post
here with any C questions you have.
 
D

David Paleino

Flash Gordon ha scritto:
...

Right, I've drawn a picture. Now, do you have a C question?

If you want me to do your homework for you then slip a brown envelope
with 200UKP in used fivers under my door and your instructors email
address. It's 500UKP if you want me to send the answer to you instead of
your instructor.

...

Lol, I never thought it could become a business :)

David
 
M

Micah Cowan

David Paleino said:
Flash Gordon ha scritto:

Lol, I never thought it could become a business :)

You're kidding, right? I won't post (or bother to rediscover) any URIs
here, but I've seen several websites dedicated to doing exactly that
for a business. Specifically for C, in fact.

I've also seen several free sites with boilerpate essays on various topics.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,176
Messages
2,570,950
Members
47,503
Latest member
supremedee

Latest Threads

Top