PROJECT_2 - CS 31 INTRODUCTION TO COMPUTER SCIENCE I...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 31: INTRODUCTION TO COMPUTER SCIENCE I Computer Science Department University of California, Los Angeles Dr. John A. Rohr January 13, 2010 PROJECT 2 Writing C++ Programs Using Sequential and Selection Statements Objective : Learn to write simple C++ programs that consist of sequential and selection statements and use numerical and string input and output. Background : Fluid flow through a feed pipe can be divided into several streams flowing through smaller distribution pipes. If the rate of flow through the feed pipe is known and if it is assumed that the flow rate through each of the distribution pipes is proportional to the cross- sectional area of the pipes, then the flow rate through each of the distribution pipes can be calculated by knowing only the diameter of each distribution pipe. Assignment : Write a simple C++ program that will do all of the following. 1. Display a title followed by a blank line. 2. Prompt for and accept the flow rate through a feed pipe. 3. Prompt for and accept the flow rate units. 4. Prompt for and accept the diameters of each of three distribution pipes. 5. Calculate the flow rate through each of the three distribution pipes. 6. Display the feed pipe flow rate. 7. Display the flow rate through each of the three distribution pipes. 8.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 4

PROJECT_2 - CS 31 INTRODUCTION TO COMPUTER SCIENCE I...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online