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
4vir4ik [10]
3 years ago
6

An oil slick occurs when an underwater refinery pipe ruptures, pumping oil into the water. The spilled oil sits on top of the wa

ter and causes a natural disaster. For simplicity, suppose that the oil sits on top of the water in the form of a circle. Write a program that prompts the user to enter the rate at which the ruptured pipe pumps oil (in gallons) per minute, the thickness of the oil on top of the water, and the number of days for which the area is covered by the spilled oil. The program outputs the spilled area (in kilometers) and the volume of oil (in gallons) on top of the water after each day.
Computers and Technology
1 answer:
yaroslaw [1]3 years ago
8 0

Answer:

Here the code is given as follows,

Explanation:

#include <iostream>

#include <iomanip>

using namespace std;

const double CUBIC_CENTIMETERS_IN_ONE_GALLON = 3785.41;

const double CENTIMETERS_IN_ONE_KILOMETER = 100000.00;

double oilSlickArea(double oilThick,

double oilReleasedRate, double spilTimeInHours);

int main()

{

double oilThickness;

double oilReleasedGallonsPerMinute;

int slickDays;

double spillArea = 0.0;

cout << fixed << showpoint << setprecision(8);

cout << "Enter the oil spill rate per minute (in gallons): ";

cin >> oilReleasedGallonsPerMinute;

cout << endl;

cout << "Enter oil thickness on top of the water (in centimeters): ";

cin >> oilThickness;

cout << endl;

cout << "Enter the number of days for which you want to know "

<< "the area covered by the spilled oil: ";

cin >> slickDays;

cout << endl;

cout << "Oil slick area after each day for " << slickDays << "days."

<< endl << endl;

cout << setw(5) << " " << setw(20) << left << "Slick Area in"

<< setw(20) << left << " Volume of Oil in" << endl;

cout << setw(5) << left << "Day " << setw(20) << left << "Square Kilometers"

<< setw(20) << left << " in Gallons" << endl;

for (int i = 1; i <= slickDays; i++)

{

spillArea = spillArea + oilSlickArea(oilThickness,

oilReleasedGallonsPerMinute, 60 * 24);

cout << setw(4) << left << i << " " << setw(12)

<< setprecision(8) << spillArea / (CENTIMETERS_IN_ONE_KILOMETER * CENTIMETERS_IN_ONE_KILOMETER)

<< " " << setprecision(2)

<< right << setw (15) << (oilReleasedGallonsPerMinute * 60 * 24 * i) << endl;

}

return 0;

}

double oilSlickArea(double oilThick,

double oilReleasedRate, double spilTimeInHours)

{

double oilVolumeInGallons;

double oilVolumeInCubicCentimeters;

double spillArea;

oilVolumeInGallons = oilReleasedRate * spilTimeInHours;

oilVolumeInCubicCentimeters = oilVolumeInGallons * CUBIC_CENTIMETERS_IN_ONE_GALLON;

spillArea = oilVolumeInCubicCentimeters / oilThick;

return spillArea;

}

You might be interested in
Is playing hockey output force or input force?
LUCKY_DIMON [66]

Answer:

Input

Explanation:

got it right on a edunuity test

7 0
3 years ago
Read 2 more answers
You want to draw a rectangle over the moon you added to your slide and then move it behind the moon. You want it to look like a
Ray Of Light [21]
I choose Home and it’s a good thing to have
5 0
3 years ago
The Western Siberian Plain is __________ in some places because it has poor natural draining systems.
Nitella [24]

This is the complete sentence about the Western Siberian Plain:

The Western Siberian Plain is <u>marshy</u> in some places because it has poor natural draining systems.

<h3>What is the Western Siberian Plain?</h3>

The Western Siberian Plain is a plain that is located in the western part of Siberia and which is known because most of the plain is poorly drained and it is considered one of the largest swamps and floodplains of the world.

This is why the correct word to complete the sentence about the Western Siberian Plain is "marshy".

Check more information about the Western Siberian Plain here brainly.com/question/14478489

#SPJ1

7 0
2 years ago
Which one do u prefer Xbox, Playstation, Nintendo ​
AnnyKZ [126]
Mobile And PC Gaming
6 0
3 years ago
Read 2 more answers
design a combinational circuit for a BCD to seven segment code converter that will input a BCD number and output it on a seven s
Vlad [161]

Answer:

See explaination

See explaination

Explanation:

Binary coded decimal:

Binary coded decimal (BCD) is a system of writing numerals that assigns a four-digit binary code to each digit 0 through 9 in a decimal (base-10) numeral. The four-bit BCD code for any particular single base-10 digit is its representation in binary notation.

Go to attachment for the step by step solution.

5 0
3 years ago
Other questions:
  • When your tire blows out in the middle of a drive, you should _____. A. let go of the steering wheel B. pump the brakes immediat
    13·2 answers
  • An online conference room reservation system lets a user reserve rooms. The user is required to enter contact information and re
    13·1 answer
  • I am a receptionist for a large corporation
    8·1 answer
  • There was a software crisis in 1968, as result of programming abilities, due to the invention of integrated circuits (chips).A.
    10·1 answer
  • Using Word, Maureen is writing an outline of a presentation she plans to give to her company. She will be showing a video during
    12·2 answers
  • What is A cell that can hold or display data​
    11·1 answer
  • 1) List at least five smaller behaviors you could break the complex behavior "brushing my teeth" into.
    14·2 answers
  • The object-oriented techniques to manage errors such as dividing a value by 0 comprise the group of methods known as
    12·1 answer
  • What are the procedures use in installing a sound card
    12·1 answer
  • PLSSSSSS HELP ASAP<br><br> What story does the game Senet tell?
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!