Language
C++
Compiler
gcc 12.1.0
Options
Warnings
Don't Use Boost
C++11
-pedantic
$ g++ prog.cc -Wall -Wextra -std=c++11 -pedantic Enter the mass and radius of sphere 1 (m1, r1): Enter the mass and radius of sphere 2 (m2, r2): Enter the distance between the two spheres (x): Distance (m) Force (N)
3.00 7415644.44
2.95 7669152.54
2.90 7922220.96
2.86 8174419.60
2.81 8425331.03
2.77 8674552.70
2.74 8921698.95
2.70 9166402.76
2.66 9408317.27
2.63 9647116.97
2.60 9882498.77
2.57 10114182.64
2.54 10341912.20
2.51 10565454.93
2.49 10784602.24
2.46 10999169.30
2.44 11208994.74
2.42 11413940.11
2.40 11613889.30
2.38 11808747.68
2.36 11998441.31
Exit Code:
0