Greetings all,
I'm having a little bit of trouble with writing a method that returns the value of a given function. The method is designed to accept an input (int b), then take the input and return the value of a.
a = b + b^2 + 2^b
I've gotten the input portion to work, but the method is where I'm struggling. For the b^2, I'm just going to use b*b. The 2^b is where I'm stuck.
*****************
public int doFunction(int b) {
b + (b*b) + ????
return result
*****************
Thanks for your consideration.
Bud