Hello
every one i am new in Java Programming,
how i need to convert this ( y=x2+6x+5 and second one: x2+x3+6x-5 ) to Java Programming code
there any one who help me regarding this Problem.
Thanks alot.
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
Hello
every one i am new in Java Programming,
how i need to convert this ( y=x2+6x+5 and second one: x2+x3+6x-5 ) to Java Programming code
there any one who help me regarding this Problem.
Thanks alot.
Hello
i am new in Java Programming,
how i need to convert this ( y=x2+6x+5 and second one: x2+x3+6x-5 ) to Java Programming code
there any one who help me regarding this Problem.
Thanks alot.
Please make an attempt to write the code and come back when you have code to share and questions that we can help you with. You might start by reviewing Java arithmetic operators, but I don't know what you don't know. Having your code attempt will answer that.
It looks like valid java syntax to me (given the right context), what seems to be the trouble?
Please do not piggy-back your questions on zombie threads.
Please do not double post your questions.
Also posted at: Error converting String to float - Dev Shed
If you don't understand my answer, don't ignore it, ask a question.
Hello GregBrannon Thanks for replay.
Mr.GregBrannno That is main problem i don't know how to write this " y=x2+6x+5 " in Java codes. I don't know that when i know it how to do in codes i will never come here for help. So please when you can help me regarding this " y=x2+6x+5 " how to write in java Codes I will be your greatfull.
Thanks alot
Did you read the info at the link I provided? If so, what is the operator for multiplying two numbers?
The equation you most recently posted is probably more accurately written as:
y = x^2 + 6x + 5
where "x^2" means "x squared or x to the second power" and "6x" means "6 times x". Do you agree? If so, take that understanding to the link I provided and rewrite the equation using Java arithmetic operators.
Make an effort and come back, showing your work and asking any questions you have. We can't do it for you, but we can help.
Thanks help.
x2 means: 2 is power of x. so my question how i will declare in java language x power 2, which operater i used for that to solve my problem.
The link in post#3 gives the operators available in java. Not all the arithmetic operators are there. Some operations are done by methods in the Math class. Read the API doc for the Math class available at this link:
Java Platform SE 7
If you don't understand my answer, don't ignore it, ask a question.
Well, that's shame, x^2 is simply x*x.
You may also use Math.pow(x,2) this means x power 2.