California State University, Northridge
|[pic] |College of Engineering and Computer Science |
| |Computer Science Department |
| |Computer Science 106 |
| |Computing in Engineering and Science |
| |Spring 2006 Number Instructor: Larry Caretto |
Solution to Midterm Exam
1. (30 points) The power output of a hydroelectric dam, P, is given by the formula P = [pic], where η is the efficiency of the hydroelectric turbines expressed as a fraction, [pic]is the mass flow rate of water through the turbine in kg/s, h is the height of the water about the turbines in meters and g = 9.808 m/s2 is the gravitational acceleration. With the units specified for the input data, P has units of watts. This number is divided by a conversion factor of 106 watts per MW to get the power output in megawatts, MW. Write the statements necessary to (1) define g as a symbolic constant, (2) prompt a user to enter the efficiency, mass flow rate, and water height in correct units, (3) get the input from the user, and (4) compute and print the power output in megawatts. (You do not have to write a complete C++ program, only the statements necessary to accomplish the stated tasks and to declare the variables that you use.)
const double g = 9.808
double mDot, height, efficiency;
cout > mDot;
cout > efficiency;
cout > height;
double power = efficiency * mDot * g * height * 1e-6;
cout ................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related searches
- california state university system
- california state university second bachelor s
- california state university tuition
- california state university jobs
- california state university system schools
- california state university system wiki
- california state university application log in
- california state university campuses list
- california state university log in
- california state university application deadline
- california state university tuition fee
- california state university fees