# I need your help ASAP :/

• November 19th, 2012, 06:31 PM
Exal
I need your help ASAP :/
Hello dear members, I am writing this new post, and not sure if I am in the correct section but forgive me as I am new to this forum.
Yes, I registered as almost all members here "Homework" -_-

But the idea was to learn first then to post, LOL .. anyways I need you urgently as I need this for tomorrow and its supposed as I am the best on my class so I cant let them down :P

Its a simple and short script but I cant make it :( As far as I remember the teacher said to use the WHILE method (Not sure if we need this)
Its about to find the mechanik energy, not sure if I am right but in physic to do this we must do like this "Potencial energy + kinetic energy".

Potencial energy formula: MxGxH
kinetic energy formula: MV²:2

If someone of you guys can help me on this, it would be more than a big big big favour ^_^
• November 19th, 2012, 07:29 PM
helloworld922
Re: I need your help ASAP :/
What do you have so far (code, thoughts, etc.)?

Also, what is the problem you're trying to solve (specifically)? You gave a vague description of what you think you're suppose to do, but there's not enough information for us to provide any meaningful suggestions.
• November 20th, 2012, 09:06 AM
pepzi999
Re: I need your help ASAP :/
I guess you mean that the user puts in the values and the program calculates it?

Code :

```  System.out.print("Potencial energy (" + m*g*h + ") + kinetic energy (" + m*v*v + ") = " + m*g*h + m*v*v + " J");```

Is that what you're trying to achieve? If so, I helped you out more than I should have, ofcourse, user input for the values may be a good idea.

How old are you anyway? I can't figure how you're the best in your class and still don't manage that.
• November 20th, 2012, 09:12 AM
Exal
Re: I need your help ASAP :/
@pepzi999, Thank you for your help, yes this is what I wanted to do, Actually the problem was that I got confused if I need to use the while method or not, I am 20 thought, and we just started learning java, this may be the 9th time we take lessons.Well thank you again for all your help, best regards.