{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Homework 7 12-3-09 river project part 2

Homework 7 12-3-09 river project part 2 - Alex Fidalgo...

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

View Full Document Right Arrow Icon
Alex Fidalgo 12/3/09 Intro to Programming E-115-C, E-115-LK I pledge that I have abided by the Stevens Honor System. _________________________ #include <iostream> #include <cmath> #include <string> using namespace std; float Wriver, Vrow, Vwater, Dwaterfall, dx, dy, x, y, nsteps, wvshore, wvcenter, rwstart, rwend; float wvfunc( float wvshore, float wvcenter, float Wriver, float y); float rwfunc( float rwstart, float rwend, float Dwaterfall, float x); int main() { char go; do { cout << "Enter water velocity at shore: " ; cin >> wvshore; cout << "Enter water velocity at center of river: " ; cin >> wvcenter; cout << "Enter rower velocity: " ; cin >> Vrow; cout << "Enter distance to waterfall: " ; cin >> Dwaterfall; cout << "Enter number of steps taken across the river: " ; cin >> nsteps; cout << "Enter value for x: " ; cin >> x; cout << "Enter value for y: " ; cin >> y; cout << "Enter river width start: " ; cin >> rwstart; cout << "Enter river width end: " ; cin >> rwend; while (( y <= Wriver) && (x <= Dwaterfall)) { Wriver = rwfunc(rwstart, rwend, Dwaterfall, x); Vwater = wvfunc(wvshore, wvcenter, Wriver, y);
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
Background image of page 2
Background image of page 3

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

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

{[ snackBarMessage ]}