76 361
Assignments Done
Successfully Done
In May 2019

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 ";
CalculateAreaCircumference(radius, area, circumReference);
cout<<"Area of the circle : "<<area<<endl<<endl;
cout<<"Circumreference of the circle : "<<circumReference<<endl<<endl;

return 0;

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions