CPTR-141 Homework #2 - Due Wednesday 4/01/14
Read section 1.2 from the textbook.
Create a program that will calculate the volume of a barrel shaped tank.
Use cout and cin I/O statements to display prompts and results on the
screen and receive input from the keyboard.
Assume all dimensions are in centimeters and measured to the nearest
centimeter (i.e. integer values can be used):
-- Prompt for diameter and height and input those values
-- Do the calculation
-- Print out the message Tank volume is xxx cubic centimeters
where xxx represents the value but I'm not asking for specifically
three digits. Let it default to however many digits it needs.
And note that for this program you don't have to define any objects.
Make sure that the first lines of your program are a "header", i.e.
comment text that looks something like this:
//-----------------------------------------------
// CPTR-142 program 1
// John Doe
// April 2, 2014
//-----------------------------------------------
Only a printout of your program (main.cpp) needs to be turned in at class
time for this assignment. But, you need to write a note at the
bottom of your printout stating if you were able to compile and
run it and if proper operation was observed. Also, note that printouts
should be folded and on the outside must be: CPTR-142 program 1,
name, and date.
Larry Aamodt PhD, PE
Professor of Engineering and Computer Science
Walla Walla University
Contact:
via email: AamoLa (at) wallawalla.edu
via phone: x2058