#include #include using namespace std; const double pi = 3.1416; void GetSphereProp(double r, double &a, double &v) // r represents the value 2. // a represents the variable Area // v represents the varaible Volume { a = 4. * pi * r * r; // assigning to variable Area v = 4./3. * pi * r * r * r; // assigning to variable Volume } int main() { double radius, Area, Volume; radius = 2.; GetSphereProp(radius , Area, Volume); // value of the variable radius passed to function // the variables Area, Volume passed to function cout << Area << ' ' << Volume << endl; }