I'm suppose to write a c++ program the computes this formula: L = Lo*sqrt(1-((v^2)/(c^2))) the way it's suppose to run when it's compile is like this Sample Run 1: Enter the proper length (m) of an object> 30 Enter the velocity (m/s) of the object relative to the observer> 239833966.4 Lo = 30.0000 m v = 239833966.4000 m/s L = 18.0000 m When I try to compile the program, I get these errors. lorentz.cpp:30:8: warning: missing terminating " character lorentz.cpp:30: error: missing terminating " character lorentz.cpp:31:12: warning: missing terminating " character lorentz.cpp:31: error: missing terminating " character lorentz.cpp: In function
Explanation / Answer
//it works fine in Code::blocks as is #include #include using namespace std; int main () { double c; double v; double Lo; double L; c = 299792458; cout > Lo; cout > v; L = Lo*sqrt(1-(v*v)/(c*c)); cout.precision(4); cout