Mary is a big fan of tropical fish. She has a few tanks of fish at home. To maintain a healthy environment for the fish, she needs to add conditioner to the water once a week. The amount of conditioner added is determined by the volume of the tank. According to the direction on the bottle, she has to add 1 ml of conditioner per 100 cubic inches of water. She wants a program to calculate exactly how much conditioner to add to a tank of water. All tanks are in rectangular shape. The program will ask for the length, the width and the height of the tank. It will calculate and display the amount of conditioner to be added. [Note: volume = length X width X height] Use the following two test cases for desk-checking [all in inches]:
length width height
20 22.5 10
16 10 15
Write a C++ programs that implements and then add code to write the result to an output file. Make sure you generate a description message with the data in the output file (i.e. The amount of conditioner to be added is 3 ml).
outFile << "The amount of conditioner to be added is "<< amount<<" ml"< Name output data file "conditioner.txt" .

Answers

Answer 1

Answer:

Answered below

Explanation:

# Program is written in Python programming language

conditioner_in_ml = 0

width = float(input("Enter width in inches: "))

height = float(input("Enter height in inches: "))

length = float (input("Enter length in inches: "))

#Calculate the volume

volume = width * length * height

#Calculate the amount of conditioner per 100 #cubic inches of volume

conditioner_in_ml = volume/ 100

print("The amount of conditioner required for $volume cubic inches is $conditioner_in_ml ml")


Related Questions

what is the best movie in the world

Answers

Answer: Sui*de Squad

Explanation: I say this because Harley Quinn is in it and I am obsessed with her lol-

Answer:

IMDb's highest rated movie is The Shawshank Redemption

Rotten Tomatoes rates The Wizard of Oz the freshest movie out there.

Metacritic Rates Citizen Kane the Best Movie of All Time, right after the Godfather.

The cost to ship a package is a flat fee of 75 cents plus 25 cents per pound. 1. Declare a const named CENTS_PER_POUND and initialize with 25. 2. Get the shipping weight from user input storing the weight into shipWeightPounds. 3. Using FLAT_FEE_CENTS and CENTS_PER_POUND constants, assign shipCostCents with the cost of shipping a package weighing shipWeightPounds.

#include
using namespace std;

int main() {
int shipWeightPounds;
int shipCostCents = 0;
const int FLAT_FEE_CENTS = 75;

/* Your solution goes here */

cout << "Weight(lb): " << shipWeightPounds;
cout << ", Flat fee(cents): " << FLAT_FEE_CENTS;
cout << ", Cents per lb: " << CENTS_PER_POUND;
cout << ", Shipping cost(cents): " << shipCostCents << endl;

return 0;
}

Answers

Answer:

Replace /* Your solution goes here */

with

const int CENTS_PER_POUND = 25;

cout << "Weight(lb): ";

cin >> shipWeightPounds;

shipCostCents = FLAT_FEE_CENTS + CENTS_PER_POUND * shipWeightPounds;

Explanation:

This line declares and initializes CENTS_PER_POUND as constant integer to 25

const int CENTS_PER_POUND = 25;

This line prompts user for weight of shipment

cout << "Weight(lb): ";

This line gets weight from the user

cin >> shipWeightPounds;

This line calculates the cost of shipment

shipCostCents = FLAT_FEE_CENTS + CENTS_PER_POUND * shipWeightPounds;

In this exercise we want to use computer and python knowledge to write the code correctly, so it is necessary to add the following to the informed code:

So we can see that in the attached image we find the code that corresponds to the answer to this question.

Are analyzing the code informed in the question we can say that:

This line declares and initializes CENTS_PER_POUND as continual number to 25, the code that we have is:

const int CENTS_PER_POUND = 25;

cout << "Weight(lb): ";

cin >> shipWeightPounds;

shipCostCents = FLAT_FEE_CENTS + CENTS_PER_POUND * shipWeightPounds;

See more about computer at brainly.com/question/950632

Other Questions
Consider the Pareto chart, which shows the number of student blood donors by their type for one day of a campus blood drive. How many students donated blood on that day? Please help me with this question someone pls help i will make brainliest IF RIGHT ANSWER! !!1 !!1 ! PLS HELP MEEEEEEEEEEEEEEEEEHow is a state supreme court different from a state trial court?A. In a trail court, many cases are decided by juries; all supreme court cases are decided by judgesB. Trial courts only deal with civil lawsuits; supreme courts deal with civil and criminal lawsuitC. Trail courts hand out criminal punishments; supreme courts decide civil casesD. There are only a few trial courtin each state; there are many more supreme courts in each states The circle graph represents the after-tax budget for the Williams family. If the total monthly budget is $3750, which is the best estimate for the food budget? A: $625 B: $1250 C: $937.50 D: $468.75 We have learned of the wickedness of the Canaanite religion from the:Lacish LettersMari LettersRas Shamra TabletsAmarna Letters Warm-UpType your response in the box.We study science to be able to answer questions about the world around us. Write down at least three questionsthat you think might be answered by studying Earth and space science. leo reads 13 pages 1/3 hour. What is the unit rate for pages per hour? For hours per page? which angle is the smallest angle What is the solution to the inequality below answer this question Find the song and Finish the verse :Daddy pone las regla', tiene' que obedecerMami, no tiene pausa, que e' lo que vas a hacer?Echale, echale, echale pa'trsEchale, echale, pa'lante y pa'trs Which one of these sentences represents the Counter Argument? 1) Beingthe firstborn is no easy task, you have to take care of your siblings and youhave way more responsabilities than the others. 2) Some people might saywe have it easy because we get to lead our siblings. 3) What they don'tknow, is that siblings often want to defy my authority, making my job a lotharder. *A: 1B: 2C: 3 What goods were traded on the Silk Road?(China) In one sentence, what does the Tricksters Tale "The Bungling Host" teach? A homeless man in panama city was arrested and charged with theft he could not afford an attorney and had to go trail without one bbb A group of close relatives living together or near each other is called an ____?A. extended familyB. nuclear familyC. blended familyD. Foster family Do the ratios 2010 and 21 form a proportion? YES OR NO ? 28 is 12 less than k. Translate (4,3) to the left 3 units. Then reflect the result over the y-axis. What are the coordinates of the final point?