"If you lie to the computer, it will get you."
Favorite Granny's Wisdom Pearl
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
"If you lie to the computer, it will get you."
Favorite Granny's Wisdom Pearl
All things are lawful, but not all things are profitable.
Stephan van Hulst wrote:You can encapsulate each equation and its string representation in an object, and then loop through a collection of them:...
D.J. Quavern wrote: Ok, so there is no way to hold the arithmetic operators in an array or something similar?
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
"If you lie to the computer, it will get you."
Favorite Granny's Wisdom Pearl
If there are multiple solutions, output any of them.
There are three kinds of actuaries: those who can count, and those who can't.
Piet Souris wrote:I like Mike's solution, but here is one more of the same, using a TriPredicate. I must say, DJ's original solution is the easiest of all
"If you lie to the computer, it will get you."
Favorite Granny's Wisdom Pearl
There are three kinds of actuaries: those who can count, and those who can't.
Piet Souris wrote:
...
Piet wrote:see if you, old and wise(?), still understad the stuff.
There are three kinds of actuaries: those who can count, and those who can't.
Piet Souris wrote:...unfortunately, java has no interface for this. We have no alternative than to define our own TriPredicate interface...
My advice is to practise this as much as you can, make QuadFunctions and PentaConsumers....
There are three kinds of actuaries: those who can count, and those who can't.
Consider Paul's rocket mass heater. |