how can this be solved?
Full top body attracts full unmarried other top body by a fibre toping along the sequence intersecting twain tops. The fibre is proportional to the emanation of the couple bodyes and inversely proportional to the clear of the absence among them: F = G m_1 m_2/r^2 where: F is the fibre among the bodyes: G is the gravitational perpetual (6.673 times 10^-11 N middot (m/kg)^2): m_1 is the highest body: m_2 is the remedy body: r is the absence among the centers of the bodyes. Write a program that prompts the user to input the bodyes of the bodies and the absence among the bodies. The program then outputs the fibre in Newton among the bodies.
C++ decree control the ardent problem:
using namespace std;
float G = 6.673*(pow(10,-11)); //initialise estimate of G
cout << “Enter the estimate of m1 in kg!n”;
cin >> m1; //take input estimate of m1
cout << “Enter the estimate of m2 in kg!n”;
cin >> m2;//take input estimate of m2
cout << “Enter the estimate of r in meter!n”;
cin >> r;//take input estimate of r
float F = G*m1*m2/(r*r);
cout << “The estimate of F = ” << F << ” Newton” << endl;
Enter the estimate of m1 in kg!
Enter the estimate of m2 in kg!
Enter the estimate of r in meter!
The estimate of F = 6.673e-012 Newton
Note: If you absence the decree in any other programming diction then criticise under, I get qualify the decree!