cs201 function trace f2006

cs201 function trace f2006 - cout << "cert =...

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

View Full Document Right Arrow Icon
const int cater = 3; void newval(int &puck, int wire); int main() { int fnum, snum; fnum = 5; snum = 8; cout << "before call" << endl; cout << "\nfnum = " << fnum << endl; cout << "snum = " << snum << endl << endl; newval(fnum, snum); // call the function cout << "after first call" << endl; cout << "fnum = " << fnum << endl; cout << "snum = " << snum << endl << endl; newval(snum, fnum); // call the function cout << "after second call" << endl; cout << "fnum = " << fnum << endl; cout << "snum = " << snum << endl; return 0; } void newval(int { int cert = 4; puck = cert * cater + wire; wire = puck + cert; cout << "puck = " << puck << endl;
Background image of page 1

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

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

Unformatted text preview: cout << "cert = " << cert << endl; cout << "wire = " << wire << endl; return; } void height(int &fnum, int sec); void leaves (int x, int &y); int main() { int maple = 120; int dist = 0; height (maple, dist); cout << " maple = " << maple << endl; cout << " dist = " << dist << endl; } //----------------------------------------------------------------------------------void height(int &fnum, int sec) { sec = 130; leaves (sec, fnum); cout << " fnum = " << fnum << endl; } //----------------------------------------------------------------------------------void leaves (int x, int &y) { x = x + y; y = x - 10; }...
View Full Document

This note was uploaded on 04/18/2008 for the course CS 201 taught by Professor Conway during the Fall '07 term at Bowling Green.

Page1 / 2

cs201 function trace f2006 - cout << "cert =...

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