Ask your own question, for FREE!
Computer Science 8 Online
OpenStudy (richyw):

I need to make a simple program for an assignment. It basically needs to evaluate a function for a number given by the user.

OpenStudy (richyw):

So I am thinking I will use java, since I am in an intro java course as well right now. I'll use a simpler formula than my physics assignment requires, but it should not make a difference for the programming.

OpenStudy (richyw):

ok say that I have the function \(f(x)=x^2+1\). I need to build a program that asks the user for the value of x, OR the value of \(y=x^{-1}\), and then will spit out the answer for f(x). I can't figure out how to do this.

OpenStudy (e.mccormick):

Are you going to use the terminal for input or a graphical window?

OpenStudy (richyw):

I used a terminal input. Figured it out though.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!