|
 |
 |
 |
 |
 |
 |
 |
 |
#include
<iostream.h>
|
|
|
void times2(int
&v1, int &v2); // function
prototype
|
|
|
void main() {
|
|
|
int x = 10;
|
|
|
int y = 15;
|
|
|
cout << "x is " <<
x << " and y is " << y << endl;
|
|
|
times2(x,y);
|
|
|
cout << “Now: x is " <<
x << “, y is " <<
y << endl;
|
|
}
|
|
void times2(int
&v1, int &v2) { v1 = v1* 2; v2 = v2 * 2; }
|
|
|
|