// File mass.cpp #include #include #include using namespace std; int main() { double m, v; cout << "Velocity " << "Mass" << endl; cout << "======== " << "====" << endl; for(v = 0.0; v <= 0.951; v += 0.05) { m = 1.0 / sqrt(1.0 - v * v); cout << right << setw(8) << setprecision(4); cout << showpoint; cout << v; cout << m << endl; } return EXIT_SUCCESS; } // Output: //Velocity Mass //======== ==== // 0.00001.000 // 0.050001.001 // 0.10001.005 // 0.15001.011 // 0.20001.021 // 0.25001.033 // 0.30001.048 // 0.35001.068 // 0.40001.091 // 0.45001.120 // 0.50001.155 // 0.55001.197 // 0.60001.250 // 0.65001.316 // 0.70001.400 // 0.75001.512 // 0.80001.667 // 0.85001.898 // 0.90002.294 // 0.95003.203