Solved CSC150 Computer Science 1 Programming Assignment 2 Writing C Programs

$30.00

Original Work ?

Download Details:

  • Name: P2-150-Fill-time-for-cylindrical-Water-Tank-jmymwe.zip
  • Type: zip
  • Size: 818.68 KB

Category: Tags: , , You will Instantly receive a download link upon Payment||Click Original Work Button for Custom work

Description

5/5 - (1 vote)

For this assignment, you’ll need to write a C program.  You must:

  • Draw a flowchart for your program.
  • Write a C program to solve the problem stated below. Test and debug your program.
  • Submit the flowchart and working .c file for your program in the Program 2 drop box in D2L by the due date shown in the D2L calendar and drop box tools.

 

 

A flowchart shows the steps that your program will perform to solve the problem and the order they will be in.  This link gives the basic symbols for program flowcharting as well as some examples:  http://www.programiz.com/article/flowchart-programming.  The first example shown is similar to what you need, except that your flowchart should have 2-4 ‘processing’ boxes that show the steps in the calculation.  You can use the ‘draw’ tools in Word to draw your flowchart, save it into a .doc or .docx file and submit it with your program file as stated above.

 

Problem – Fill Time

With the dry weather we’ve had this year, many livestock producers have needed to supplement their normal water supplies with extra water tanks.

 

Write a program to calculate the time needed to fill a circular water tank.

 

Read the tank’s diameter and height from the user in feet.

 

Read the flow rate for the hose that’s used to fill the tank from the user in gallons per minute.  (For testing purposes, most hoses have a fill rate of 7 to 15 gallons per minute).

 

1 cubic foot of water equals 7.48 gallons.

 

The volume of a cylinder is the area of the base times the height.

 

Print the tank’s radius in feet, the tank’s volume in both cubic feet and gallons and the time needed to fill the tank in minutes.

 

Use constants and variables as appropriate.  Be sure to document your program by including a comment block at the top of the file with your name, the date, the course, the assignment, and a brief description of the program.  Also put a line comment before each group of statements saying what they do.