64 604
Assignments Done
99,1%
Successfully Done
In September 2018

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;
}


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!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions