How would you apply this formula to c++ program?
t=2π√L/g
How would you apply this formula to c++ program?
t=2π√L/g
What do you mean? You want to write it as a C statement?
I'm going to give you an example of a math statement, not exactly the statement of what you are asking for, as that would be "solving the equation for you":
--Code:// Calculate the distance from 0,0 to x, y, using Pythagoras' method double distance(double x, double y) { double dist; dist = sqrt(x * x + y * y); return dist; }
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
What are you having trouble with ? What have you tried ?