SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
aditee sharma wrote:Given that a Goat costs 0.50 Paise(or cents), a Horse costs 10 Rs.(or $) and a Cow costs 3 Rs. and you have 100 Rs. in hand.
How many animals of each category would you buy so that that total no. of animals is 100 ?
aditee sharma wrote:How many animals of each category would you buy so that that total no. of animals is 100 ?
ankur rathi wrote:
aditee sharma wrote:How many animals of each category would you buy so that that total no. of animals is 100 ?
I think the question did say you have to buy each type of animal. Or am I interpreting it wrong!
Paul Clapham wrote:One is Ankit's (after correcting the typo from 30 cows to 20)
SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Mike Simmons wrote:
ankur rathi wrote:
aditee sharma wrote:How many animals of each category would you buy so that that total no. of animals is 100 ?
I think the question did say you have to buy each type of animal. Or am I interpreting it wrong!
I think you're interpreting it wrong. If someone asks "how many should I buy?" then "zero" is a perfectly acceptable answer. A negative number would (usually) be unacceptable, and a non-integer value would be unacceptable for some things (animals, cars, books, computers, for example) but perfectly acceptable for others (pounds of grain, or grams of pure gold, for example). But nothing in the question implies that you have to buy a nonzero quantity of each animal.
SCJP 5.0 SCWCD 5.0
ankur rathi wrote:If someone says "buy me this chocolate".
You don't say "I am buying this, I am buying 0 quantity of this".
I have always wanted to have a neighbor just like you - Fred Rogers. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
|