98 951
Assignments Done
98.8%
Successfully Done
In May 2021

# Answer to Question #1598 in C++ for idaira

Question #1598
Write a C++ program that takes in the radius (as in integer) of a circle from user and calculate the area of the circle through a function. If the area is greater than 50, display the circle&rsquo;s area along with a message that the circle is big else display the circle&rsquo;s area and the message that the circle is small. Define a function named calculateArea() to take in the radius as its argument and calculate the circle&rsquo;s area before returning the area as type double.
1
2011-02-18T06:14:11-0500
#include <iostream>
#include <cmath>

using namespace std;

double calculateArea(double);

int main(int argc, char** argv)
{
do
{
cout << "Input the value of radius: ";
}
if(area > 50)
cout << area << endl << "The circle is big." << endl;
else
cout << area << endl << "The circle is small." << endl;
return 0;
}

{
return M_PI * pow(radius, 2) / 2.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!

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS