Results 1 to 5 of 5

Thread: C++ Problem

Threaded View

  1. #1

    Thread Starter
    Fanatic Member Wynd's Avatar
    Join Date
    Dec 2000
    Location
    In a bar frequented by colossal death robots
    Posts
    772

    C++ Problem

    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.
    Code:
                   N           C
          |-------------------|
          |                   |
          |                   |
          |                   |
    300 M |        M          |
          |                   |
          |                   |
          |                   |
          |-------------------|
         D
    I don't really have any idea how to start, can someone please help me?
    Last edited by Wynd; Oct 25th, 2001 at 07:52 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width