#include<iostream>
using namespace std;

// Declare the flip-and-multiply function
void flipAndMult(int &num1, int &num2, int multiplier);


int main()
{
 // Initialize variables
 int a=2, b=7, mult=3;

 // Flip and multiply variables
 flipAndMult(a,b,3);

 // Output results to screen
 cout << a << " " << b << endl;

 return 0;
}


// Flip the first two variables and multiply each by
// the third variable
void flipAndMult(int &num1, int &num2, int multiplier)
{
 int oldNum1=num1;
 num1=num2*multiplier;
 num2=oldNum1*multiplier;
}