Wynd
Oct 25th, 2001, 07:41 PM
A mad dog is at the southwest coner of a square garden on top of the garden wall. A man is at the center of the garden. The dog will nip the man if he catches him on the wall, otherwise he will leave the man alone. The dog runs π times as fast as the man. π ~ 3.14159265.
A. Show that the man cannot get out by running to N or C or any place between D and N or D and C.
B. Write a program to check points on the wall between N and C by taking 2-meter intervals and printing out 'ouch' of the dog can catch man, 'safe' if man gets out. N C
|-------------------|
| |
| |
| |
300 M | M |
| |
| |
| |
|-------------------|
DI don't really have any idea how to start, can someone please help me?
A. Show that the man cannot get out by running to N or C or any place between D and N or D and C.
B. Write a program to check points on the wall between N and C by taking 2-meter intervals and printing out 'ouch' of the dog can catch man, 'safe' if man gets out. N C
|-------------------|
| |
| |
| |
300 M | M |
| |
| |
| |
|-------------------|
DI don't really have any idea how to start, can someone please help me?