0
I want help
Can i write a physic equation into method in java? Is that easy or not? To do all the calculation and run the result correctly! Task and equation: https://www.sololearn.com/post/338825/?ref=app
7 Answers
+ 3
Add it to a feed post and link it here Manar naif
+ 2
It would be good to show us the equation.
+ 2
Okay.
Start to split up the terms of the equation, calculate the fraction for the e function first.
For the Euler function you can use
https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html#exp-double-
For the other exponential terms, Math.pow should do the trick (I can't read the exponential numbers tbh, but I hope a double is enough)
https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html#pow-double-double-
Once you've done that for the first value of V, let's say 0.6 try to embed the formula in a loop to increment the value for V from 0.6 to 0.75.
+ 1
Sure, it's possible.
But first you need to learn the basics of Java. Since you've already started the tutorial, keep going, practice, and soon you will figure it out.
0
i have already learned the basics, but this equation i have it's too complicated.
0
i would like to show the equation but i dont know how send photo here or write it