#include #include #include #include #include "relativistic_rocket.h" using namespace std; int main() { const double a[] = { //fraction of the speed of light 0, sqrt( 3.0) / 2, sqrt(15.0) / 4, sqrt(63.0) / 8, 1 }; const size_t n = sizeof a / sizeof a[0]; for (const double *p = a; p < a + n; ++p) { const relativistic_rocket r(1, *p * relativistic_rocket::c()); cout << "velocity == " << scientific << r.v() << resetiosflags(ios_base::floatfield) //turn off scientific << ", length == " << r.length() << "\n"; } return EXIT_SUCCESS; }