1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Doss [256]
3 years ago
13

c++ Project 6: Buoyancy. Buoyancy is the ability of an object to float. Archimedes’ principle states that the buoyant force is e

qual 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).
Computers and Technology
1 answer:
nordsb [41]3 years ago
8 0

Answer:

Following is C++ program to check the buoyancy of sphere:

#include <stdio.h>

#include <iostream>

using namespace std;

int main()

{

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

cout<<"Enter the weight of sphere"<<endl;

cin>>weight;

cout<<"Enter the radius of sphere"<<endl;

cin>>radius;

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

fb = vol*y;

if(fb>=weight)

 cout<<"Sphere will float"<<endl;

else

 cout<<"Sphere will sink"<<endl;

 

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.

You might be interested in
Which piece of personal information do websites often require users to enter?
Tatiana [17]
<h2>Answer: <u><em>The most common type of information that a website will ask you for is a password, which is unique to that site. Eye color is irrelevant for sites since there are only about 5 possible colors for human eyes. Most of the time there is no practical use for that information.</em></u></h2>

Explanation:

<h2><u><em>Hope this helps</em></u></h2>
7 0
4 years ago
Read 2 more answers
Write an if statement that assigns 0.2 to commission if sales is greater than or equal to 10000.
7nadin3 [17]
If (sales >= 10000)
commission = 0.2;
8 0
2 years ago
Which of the following is NOT necessary for organizing data to make it easier to sort?
Elenna [48]

Answer:

All the data must be the same font and font size is not necessary for data sorting.

Explanation:

The most easier and frequently used tool for data organizing and sorting is Microsoft's excel or google spreadsheet. Sorting deals with arrangement of  data values in a particular sequence or order according to defined rules. For example data can be sort in ascending or descending order as per values or names in list.

7 0
3 years ago
Which of the following answers refers to a system containing mappings of domain names to various types of data, such as numerica
BartSMP [9]

Answer:

DNS or Domain Name System

Explanation:

You can query a DNS server with a domain name to get an IP address.

5 0
3 years ago
Which of the following declares an abstract method in an abstract C++ class? (Points : 2) public: void print();
Dahasolnce [82]

Answer:

public: virtual void print()=0;

Explanation:

An abstract class contains a pure virtual function. Pure virtual class cannot be instantiated but it can be subclassed and the subclass can provide an implementation of the function.

A virtual function declaration in the class is preceded by the virtual keyword. For example, virtual void print();

A pure virtual function declaration is followed by '=0;'

public: virtual void print()=0;

4 0
4 years ago
Other questions:
  • 1.) How do parks and other green spaces benefit a community?
    7·2 answers
  • Design an algorithm for finding all the factors of a positive integer. For example, in the case of the integer 12, your algorith
    8·1 answer
  • If you buy a 20 dollar thing with a 25 dollar gift card, do you still have 5 dollars?
    7·2 answers
  • Using a single formatting _______ helps to make reading researched information easier; it lets the reader know what to expect.
    7·1 answer
  • Which of the following browsers was introduced with windows 10?
    10·1 answer
  • 4.7 Code Practice: Question 2
    7·1 answer
  • Which tags do you use to write the header and items of an ordered list on a web page?
    14·1 answer
  • Select the correct text in the passage.
    12·1 answer
  • A user can add color to a database to highlight a modification. To do this with a macro, which command screen would you access o
    9·1 answer
  • Does anyone have any tips on how to begin a 10 page Capstone project paper? I've got to write a write a research paper on the ty
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!