Ask Question
6 September, 20:00

c+ + Project 6: Buoyancy. Buoyancy is the ability of an object to float. Archimedes' principle states that the buoyant force is equal to the weight of the fluid that is displaced by the submerged object. The buoyant force can be computed by Fb = V * y where Fb is the buoyant force, V is the volume of the submerged object, and y is the specific weight of the fluid. If Fb is greater than or equal to the weight of the object, then it will float, otherwise it will sink. Write a program that inputs the weight (in pounds) and radius (in feet) of a sphere and outputs whether the sphere will sink or float in water. Use y = 62.4 lb/cubic feet as the specific weight of water. The volume of a sphere is computed by (4/3) π (r cubed).

+2
Answers (1)
  1. 6 September, 21:12
    0
    Following is C+ + program to check the buoyancy of sphere:

    #include

    #include

    using namespace std;

    int main ()

    {

    double radius, weight, fb, vol, y = 62.4;

    cout<<"Enter the weight of sphere"<
    cin>>weight;

    cout<<"Enter the radius of sphere"<
    cin>>radius;

    vol = (4/3) * 3.14*radius*radius*radius;

    fb = vol*y;

    if (fb>=weight)

    cout<<"Sphere will float"<
    else

    cout<<"Sphere will sink"<
    return 0;

    }

    Output:

    Enter the weight of sphere

    545.63

    Enter the radius of sphere

    5

    Sphere will float

    Explanation:

    The program will ask the user to input weight and radius of sphere. Using the value of radius the program will calculate the volume of sphere as per given formula. And using the volume it will next calculate the buoyant force.

    Then using if condition the program will check the obtained buoyant force is grater than the weight of object to know if it will float or not.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “c+ + Project 6: Buoyancy. Buoyancy is the ability of an object to float. Archimedes' principle states that the buoyant force is equal to ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers