Homework Solution: Every point mass attracts every single other point mass by a force pointing along the line int…

    Problem 1: Every point mass attracts every single other point mass by a force pointing along the line intersecting both points. The force is proportional to the product of the two masses and inversely proportional to the square of the distance between them: m1m2 where: . F is the force between the masses; · G is the gravitational constant (6.673×10-11 N·(m/kg)2); mi is the first mass; mz is the second mass; . r is the distance between the centers of the masses. Write a program that prompts the user to input the masses of the bodies and the distance between the bodies. The program then outputs the force in Newton between the bodies.how can this be solved?
    Every point mass attracts every single other point mass by a force pointing along the line intersecting both points. The force is proportional to the product of the two masses and inversely proportional to the square of the distance between them: F = G m_1 m_2/r^2 where: F is the force between the masses: G is the gravitational constant (6.673 times 10^-11 N middot (m/kg)^2): m_1 is the first mass: m_2 is the second mass: r is the distance between the centers of the masses. Write a program that prompts the user to input the masses of the bodies and the distance between the bodies. The program then outputs the force in Newton between the bodies.

    Expert Answer

     
    C++ code for the given problem: #include

    Problem 1: Whole subject-matter magnitude attracts whole unique other subject-matter magnitude by a soundness subject-mattering parallel the cord intersecting twain subject-matters. The soundness is proportional to the effect of the span magnitudees and inversely proportional to the clear of the remoteness among them: m1m2 where: . F is the soundness among the magnitudees; · G is the gravitational uniform (6.673×10-11 N·(m/kg)2); mi is the primitive magnitude; mz is the prevent magnitude; . r is the remoteness among the centers of the magnitudees. Write a program that prompts the user to input the magnitudees of the bodies and the remoteness among the bodies. The program then outputs the soundness in Newton among the bodies.how can this be solved?

    Whole subject-matter magnitude attracts whole unique other subject-matter magnitude by a soundness subject-mattering parallel the cord intersecting twain subject-matters. The soundness is proportional to the effect of the span magnitudees and inversely proportional to the clear of the remoteness among them: F = G m_1 m_2/r^2 where: F is the soundness among the magnitudees: G is the gravitational uniform (6.673 times 10^-11 N middot (m/kg)^2): m_1 is the primitive magnitude: m_2 is the prevent magnitude: r is the remoteness among the centers of the magnitudees. Write a program that prompts the user to input the magnitudees of the bodies and the remoteness among the bodies. The program then outputs the soundness in Newton among the bodies.

    Expert Counterpart

     

    C++ order control the fond problem:

    #include<bits/stdc++.h>

    using namespace std;

    int main()

    {

    float m1,m2,r;

    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;

    return 0;

    }

    Sample Output:

    Enter the estimate of m1 in kg!
    2
    Enter the estimate of m2 in kg!
    5
    Enter the estimate of r in meter!
    10
    The estimate of F = 6.673e-012 Newton

    Note: If you omission the order in any other programming conversation then expatiate beneath, I conquer qualify the order!