// pgm22 Reading in two pieces of data inside a function // 10/31/2016 #include #include using namespace std; // prototypes void getTwoNums(int&, int&); int main() { int num1, num2; getTwoNums(num1, num2); cout << "In main, num1 is: " << num1 << " num2 is: " << num2 << endl; return 0; } void getTwoNums(int &x, int &y) { // reads in two numbers cout << "Enter two numbers: "; cin >> x >> y; return; } /* LAB ASSIGNMENT: Modify the findmaxmin function to accept only TWO parameters. The function should put the larger of the two parameters into the first parameter, and the smaller into the second. Hint: use the idea of swap with reference parameters. */