Re: New to Java, need help
Suggestions:
- First calculate your result and put it into a double variable, then print out the result.
- You shouldn't use this forum as a substitute for your compiler since it is so easy for you to compile, check errors, revise and re-compile yourself, and I suggest that you do just this.
- If you are unclear about what error messages mean, please post the messages and your questions.
Next we'll work on code tags when posting code in the forum, but one thing at a time.
Best of luck!
Re: New to Java, need help
I'm not sure what you mean by put it into a double variable, sorry, I'm not as competent on the subject as I'd hoped :P
I compiled and it simply printed out x+n*y-(x+n)*y
Re: New to Java, need help
Quote:
Originally Posted by
Aimforthehead
I'm not sure what you mean by put it into a double variable, sorry, I'm not as competent on the subject as I'd hoped :P
I compiled and it simply printed out x+n*y-(x+n)*y
As expected.
This forum is not a great substitute for a textbook or tutorial and you really need to hit the basic tutorials to move forward. Read up on how to declare and use variables first.
Re: New to Java, need help
Oh, all I had to do was write it as
double x;
x = 2.5;
etc.
and get rid of the quotations around my input....
I know it's good to learn these things on your own and all, but I don't think it would have been all that harmful to let me know I was at least really close -_- Thanks for the time.
Re: New to Java, need help
Quote:
Originally Posted by
Aimforthehead
Oh, all I had to do was write it as
double x;
x = 2.5;
etc.
and get rid of the quotations around my input....
I know it's good to learn these things on your own and all, but I don't think it would have been all that harmful to let me know I was at least really close -_- Thanks for the time.
My concern though is if you don't know how to declare a variable, you've got some gaps that need to be filled and more than just on the specifics of variable handling. This is best solved by study.
Re: New to Java, need help
I understand, I will learn patience from this :D