63 192
Assignments Done
99,3%
Successfully Done
In July 2018

Answer to Question #31204 in C++ for ihab

Question #31204
Write a program to calculate area of circle using friend function ?
Expert's answer
#include <iostream>
#include <math.h>

using namespace std;
int area(double R)
{
double AREA2=0;
double Pi=3.14159265358979;
AREA2= Pi*R*R;
cout<<AREA2;
}

int main()
{

double r;
cout<<"enter R"<<endl;
cin>>r;
area(r);

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