There are three animals running continuously on a circular racetrack: a cheetah, a rabbit and a tortoise.
They start at a different (or same) starting point, and run at a different speed. However, the cheetah always runs faster than the rabbit, and the rabbit always runs faster than the tortoise.
If the rabbit catches up with the tortoise, it will stop and wait for the cheetah. If they start at the same starting point, the rabbit will not move.
If the cheetah catches up with the rabbit, a murder occurs and the game is over. If they start at the same point, the game is over immediately.
Write a C++ program to compute the time required for the murder to take place. Your program should compute the time required for the cheetah to catch up with the rabbit. Then you should output the time and position of the murder.
Anyone? Please?
Leave a Reply