Can any one please give me C implementation of the problem immediately if possible:
In a field there are four animals, a dog, a snake, a mouse, a mongoose..dogs kill mongoose
mongoose kills snakes
and snakes kill mice..
The speeds of the mouse snake mongoose and dog are respectively 8, 12, 18 and 30 km/hour...
simulate the chase with different starting positions (x,y) to see which animal gets killed first.......
anithaca_333
0
Newbie Poster
Recommended Answers
Jump to PostWell it sounds like a problem to do with speed = distance /time.
The 2d starting point might assume some use of vectors although I'm not sure.
Frankly the way you've phrased your question would suggest you have no intention of actually doing it yourself.
So you're …
Jump to PostSimple word problem. Just like math change your word problem into a mathematical expression.
Each animal has its own X,Y on a graph, so you'll need to enter each coordinate by keyboard.
You know...
dog > mongoose > snakes > mouse
...So you know what chases what!
Nobody …
All 6 Replies
iamthwee
wildgoose
420
Practically a Posting Shark
anithaca_333
0
Newbie Poster
Ezzaral
2,714
Posting Sage
Team Colleague
Featured Poster
wildgoose
420
Practically a Posting Shark
anithaca_333
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.