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
svetoff [14.1K]
2 years ago
14

Because filling a pool/pond with water requires much more water than normal usage, your local city charges a special rate of $0.

77 per cubic foot of water to fill a pool/pond. In addition, it charges a one-time fee of $100.00 for filling. This water department has requested you, as a programmer, write a C program that allows the user to enter a pool's length, width, and depth, in feet measurement. The program will then calculate the pool's volume, the volume of water needed to fill the pool with the water level 3 inches below the top, and the final cost of filling the pool, including the one-time fee. And then, all the entered sizes of the pool (in feet) and the three calculated values will be displayed on the screen. Finally, your full name as the programmer who wrote the program must be displayed at the end. To find the volume of the pool in cubic feet, use the formula: volume
Computers and Technology
1 answer:
nevsk [136]2 years ago
3 0

Answer:

In C:

#include <stdio.h>

int main(){

   float length, width, depth,poolvolume,watervolume,charges;

   printf("Length (feet) : ");    scanf("%f",&length);

   printf("Width (feet) : ");    scanf("%f",&width);

   printf("Depth (feet) : ");    scanf("%f",&depth);

   poolvolume = length * width* depth;

   watervolume = length * width* (12 * depth - 3)/12;

   charges = 100 + 0.77 * watervolume;

   printf("Invoice");

   printf("\nVolume of the pool: %.2f",poolvolume);

   printf("\nAmount of the water needed: %.2f",watervolume);

   printf("\nCost: $%.2f",charges);

   printf("\nLength: %.2f",length);

   printf("\nWidth: %.2f",width);

   printf("\nDepth: %.2f",depth);

   printf("\nMr. Royal [Replace with your name] ");

   return 0;}

Explanation:

This declares the pool dimensions, the pool volume, the water volume and the charges as float    

float length, width, depth,poolvolume,watervolume,charges;

This gets input for length

   printf("Length (feet) : ");    scanf("%f",&length);

This gets input for width

   printf("Width (feet) : ");    scanf("%f",&width);

This gets input for depth

   printf("Depth (feet) : ");    scanf("%f",&depth);

This calculates the pool volume

   poolvolume = length * width* depth;

This calculates the amount of water needed

   watervolume = length * width* (12 * depth - 3)/12;

This calculates the charges

   charges = 100 + 0.77 * watervolume;

This prints the heading Invoice

printf("Invoice");

This prints the volume of the pool

   printf("\nVolume of the pool: %.2f",poolvolume);

This prints the amount of water needed

   printf("\nAmount of the water needed: %.2f",watervolume);

This prints the total charges

   printf("\nCost: $%.2f",charges);

This prints the inputted length

   printf("\nLength: %.2f",length);

This prints the inputted width

   printf("\nWidth: %.2f",width);

This prints the inputted depth

   printf("\nDepth: %.2f",depth);

This prints the name of the programmer

   printf("\nMr. Royal [Replace with your name] ");

   return 0;}

<em>See attachment for program in text file</em>

Download txt
You might be interested in
Does anybody have the answer for 2.19.6 checkerboard for codehs??
ANTONII [103]

Answer:

speed(0)

penup()

setposition(-200,-200)

pendown()

def draw_square_row():

color_value = 0

for i in range (10):

if color_value %2 == 0:

begin_fill()

color("red")

for i in range (4):

forward(40)

left(90)

forward(40)

color_value = color_value + 1

end_fill()

elif color_value %2 == 1:

begin_fill()

color("black")

for i in range (4):

forward(40)

left(90)

forward(40)

color_value = color_value + 1

end_fill()

def draw_square_row_2():

color_value = 1

for i in range (10):

if color_value %2 == 0:

begin_fill()

color("red")

for i in range (4):

forward(40)

left(90)

forward(40)

color_value = color_value + 1

end_fill()

elif color_value %2 == 1:

begin_fill()

color("black")

for i in range (4):

forward(40)

left(90)

forward(40)

color_value = color_value + 1

end_fill()

def move_up_a_row():

left(90)

forward(40)

right(90)

backward(400)

for i in range (5):

draw_square_row()

move_up_a_row()

draw_square_row_2()

move_up_a_row()

Explanation:

tell me if you get it right

5 0
2 years ago
When copper wires are bundled together, they are susceptible to ____________, a form of interference where the signals leak out
maksim [4K]

Answer:

crosstalk

Explanation:

6 0
1 year ago
What's a qat on a computer
suter [353]
The answer is ..........

The Microsoft Quick Access Toolbar (QAT<span>) is a toolbar menu that appears in Microsoft Excel, Microsoft Word, and other Office 2007 and above products in the top left corner of the window. As seen in the picture, the Quick Access Toolbar gives you quick access to commonly used features such as the Save feature.
</span>
hope it helps have a great one! :)
5 0
2 years ago
Read 2 more answers
host b is sending an email intented for the user on host a to the mail server what protocol is being used to send the message
KatRina [158]

Answer:

SMTP

Explanation:

This is the SMTP or the Simple Mail Transfer Protocol. It is the push protocol and is used to send the mail message. Whereas POP3 and IMAP are meant for retrieving the message. These are the three main types of protocols associated with mail services. And the correct answer here is certainly the SMTP.

3 0
3 years ago
Describe network in terms of the class computer lab
kobusy [5.1K]
<span>a group or system of interconnected people or things</span>
6 0
3 years ago
Other questions:
  • Binary is a sequence of 0s and 1s such as 1001101 which can be used to code information. To break a code, you need to find how m
    14·1 answer
  • strategy that is used to help improve the chances that your site will be found by search engines is known as search engine
    12·1 answer
  • A directional antenna issues wireless signals along a(n) ____ direction.
    9·1 answer
  • HELP ASAP U GET BRAINLIEST
    15·2 answers
  • Write the definition of a function named quadratic that receives three double parameters a, b, c. If the value of a is 0 then th
    12·1 answer
  • For some reason, Danica's classmate George could not find the registered symbol in the symbol gallery. He is selling
    14·1 answer
  • How does an individual's access to a wide range of online services affects their ability to operate safely in the digital world.
    5·1 answer
  • B. What significant values have you learned while learning the tools and utensils?
    8·1 answer
  • Heeeeeeeelp :)<br> thx<br> jfdyiusjmkdsuiho;dmcvrvho;j
    5·2 answers
  • List at least 5 features that can be used to format a report.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!