i dont now any thing
I'm sorry? I think you know a lot more than you realise. You've got your problem, now tell me what steps you need to do to solve it.
Don't post code at this point. Assume that the computer is a person that will follow instructions. You talk to the person as input, the person does
something and then talks back for output.
Now, what you need to think about is:
- what are you going to say to the person?
- what is the person going to have to do (i.e. what calculations will it need to do)?
- what is the person going to say to you?
Frame your solution like:
person says, "What is the mass in grams?"
you say, "<some number>"
person stores m=<some number>
person calculates E=m*(c^2) where ^ means to the power of
person says "The energy in " m " grams is " E " Joules"
Adrian