# Answer to Question #48789 in C++ for ama nae

Question #48789

Convert the program to calculate the area and circumference of the circle into function by reference code.

Expert's answer

#include <iostream>

using namespace std;

void CalculateAreaCircumference(float radius, float &area, float &circumReference)

{

circumReference = 2 * 3.14 * radius;

area = 3.14 * radius * radius;

}

int main()

{

float radius, area, circumReference;

cout<<"Enter the radius of the circle ";

cin>>radius;

system("cls");

CalculateAreaCircumference(radius, area, circumReference);

cout<<"Area of the circle : "<<area<<endl<<endl;

cout<<"Circumreference of the circle : "<<circumReference<<endl<<endl;

system("pause");

return 0;

}

using namespace std;

void CalculateAreaCircumference(float radius, float &area, float &circumReference)

{

circumReference = 2 * 3.14 * radius;

area = 3.14 * radius * radius;

}

int main()

{

float radius, area, circumReference;

cout<<"Enter the radius of the circle ";

cin>>radius;

system("cls");

CalculateAreaCircumference(radius, area, circumReference);

cout<<"Area of the circle : "<<area<<endl<<endl;

cout<<"Circumreference of the circle : "<<circumReference<<endl<<endl;

system("pause");

return 0;

}

``

Need a fast expert's response?

Submit orderand get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

## Comments

## Leave a comment